Mako 8.2.0 API
MakoCore SDK API Documentation
Loading...
Searching...
No Matches
idomfont.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2007-2025 Global Graphics Software Ltd. All rights reserved.
3 */
4
11
12#ifndef IDOMFONT_H
13#define IDOMFONT_H
14
15#include <map>
16#include <edl/edltypes.h>
17#include <edl/edlstream.h>
18#include <edl/idomnode.h>
19#include <edl/idomglyph.h>
20#include <edl/isession.h>
21#include <edl/edlvector.h>
22#include <edl/idomhashable.h>
23#include <edl/edlsimplebuffer.h>
24#include <jawsmako/pdfobjects.h>
25
27
35{
36#define IDOMFontSourceClassID 0x2eed7bfe, 0x821011dc, 0x83140800, 0x200c9a66
37public:
51
58 class Data : public CClassParams
59 {
60 public:
61
63
68 };
69
74 static const CClassID &classID()
75 {
77 return id;
78 };
79
85
90 virtual const EDLSysString &determineUri() const = 0;
91};
93#define edlobj2IDOMFontSource(src) edl_cast((IDOMFontSource *)nullptr, src)
94
95
96
104{
105public:
106
118
124
132 {
133 public:
134 IDOMFontSourcePtr inputFontSource; //The input font source
135 };
136
141 virtual IInputStreamPtr getStream() const = 0;
142
147 virtual const EDLSysString &determineUri() const = 0;
148
153 virtual IDOMFontSourcePtr getInputFontSource() const = 0;
154
155};
157#define edlobj2IDOMFontSourceStreamFilter(src) edl_cast((IDOMFontSourceStreamFilter *)nullptr, src)
158
159
165class
167{
168#define IDOMFontSourceFromStreamClassID 0x6d2e3ca8, 0x821511dc, 0x83140800, 0x200c9a66
169public:
177 {
178 public:
179 Data() : streamLength(0), fromPcl(false)
180 {}
182 IInputStreamPtr stream;
185 };
186
191 static const CClassID &classID()
192 {
194 return id;
195 };
196
201 virtual IInputStreamPtr getStream() const = 0;
202
207 virtual int64 getStreamLength() const = 0;
208
213 virtual const EDLSysString &determineUri() const = 0;
214
219 virtual bool getFromPcl() const = 0;
220};
222#define edlobj2IDOMFontSourceFromStream(src) edl_cast((IDOMFontSourceFromStream *)nullptr, src)
223
224
232{
233#define IDOMFontSourceObfuscationConverterClassID 0x51e24e4a, 0x831a11dc, 0x83140800, 0x200c9a66
234public:
235
241 typedef enum
242 {
245
246 } eOperation;
247
255 {
256 public:
257 IDOMFontSourcePtr inputFontSource;
259 };
260
265 static const CClassID &classID()
266 {
268 return id;
269 };
270
275 virtual IInputStreamPtr getStream() const = 0;
276
281 virtual const EDLSysString &determineUri() const = 0;
282
287 virtual IDOMFontSourcePtr getInputFontSource() const = 0;
288
289};
291#define edlobj2IDOMFontSourceObfuscationConverter(src) edl_cast((IDOMFontSourceFromStream *)nullptr, src)
292
293
300{
301#define IDOMFontClassID 0x4330123e, 0x7e6211dc, 0x83140800, 0x200c9a66
302public:
303
310
316 typedef std::map<CharCode, IDOMGlyph::GlyphID> CCharacterMap;
317
331
338 class Data : public CClassParams
339 {
340 public:
341 IDOMFontSourcePtr fontSource;
342 };
343
348 static const CClassID &classID()
349 {
350 static CClassID id(IDOMFontClassID);
351 return id;
352 };
353
359 virtual eFontType getFontType() const = 0;
360
365 virtual IDOMFontSourcePtr getFontSource() const = 0;
366
371 virtual void setFontSource(const IDOMFontSourcePtr &fontSource) = 0;
372
377 virtual IInputStreamPtr getFontBaseStream() const = 0;
378
385 virtual void getCharacterMap(CCharacterMap &characterMap, uint32 fontIndex = 0U) = 0;
386};
388#define edlobj2IDOMFont(src) edl_cast((IDOMFont *)nullptr, src)
389
390
397
398
400{
401#define IFontOpenTypeTableAccessorClassID 0x06e3b890, 0xda2311dc, 0x95ff0800, 0x200c9a66
402public:
403
408 static const CClassID &classID()
409 {
411 return id;
412 };
413
419 virtual bool hasTable(TableSignatureID tableSignatureID) = 0;
420
428 virtual int32 getTableSize(TableSignatureID tableSignatureID, bool withPadding = true) = 0;
429
436 virtual uint32 getTableCheckSum(TableSignatureID tableSignatureID) = 0;
437
445 virtual int32 tableWrite(const IOutputStreamPtr &outStream, TableSignatureID tableSignatureID, int32 startPos = 0, int32 endPos = -1, bool withPadding = true) = 0;
446
454#ifdef SWIG
455#if SWIGJAVA
456 %apply char *BYTE {unsigned char *buf}
457#endif
458#if SWIGCSHARP
459 %apply unsigned char INPUT[] {unsigned char *buf}
460#endif
461#endif
462 virtual int32 tableCopy(unsigned char *buf, int32 bufSize, TableSignatureID tableSignatureId, bool withPadding = true) = 0;
463#ifdef SWIG
464 %clear unsigned char *buf;
465#endif
466};
467
469#define edlobj2IFontOpenTypeTableAccessor(src) edl_cast((IFontOpenTypeTableAccessor *)nullptr, src)
470
471
473{
474#define IFontTrueTypeGlyphIDEnumeratorClassID 0xa8c1c370, 0xdb1111dc, 0x95ff0800, 0x200c9a66
475public:
476
481 static const CClassID &classID()
482 {
484 return id;
485 };
486
492
497 virtual bool haveMoreEnumerationItems() = 0;
498
503 virtual bool nextEnumerationItem() = 0;
504};
506
508{
509#define IFontTrueTypeGlyphAccessorClassID 0x114cab20, 0xda2311dc, 0x95ff0800, 0x200c9a66
510public:
511
516 static const CClassID &classID()
517 {
519 return id;
520 };
521
527 virtual bool hasGlyph(IDOMGlyph::GlyphID glyphID) = 0;
528
535
542 virtual int32 glyphDataWrite(const IOutputStreamPtr &outStream, IDOMGlyph::GlyphID glyphID) = 0;
543
549 virtual IDOMGlyphIDEnumeratorPtr getDependantGlyphIDEnumerator(IDOMGlyph::GlyphID glyphID) = 0;
550};
551
553#define edlobj2IFontTrueTypeGlyphAccessor(src) edl_cast((IFontTrueTypeGlyphAccessor *)nullptr, src)
554
555class IDOMFontOpenType;
557
558class IDOMFontOpenTypeTT ;
560
567{
568#define IDOMFontOpenTypeClassID 0x287baf3f, 0x307e4aa0, 0xa66f981f, 0xd4ac090a
569public:
577 static EDL_API IDOMFontOpenTypePtr create(IEDLClassFactory *pFactory, const IInputStreamPtr &stream);
578
592
611
619 {
620 public:
621
663
668 {
670 }
671
672
678 Signature (const char *str)
679 {
680 m_eSignature = eSignatureNone;
681 set(str);
682 }
683
690 {
691 set(sSignature);
692 }
693
700 {
701 m_eSignature = eSignatureNone;
702 set(signature);
703 }
704
705 void set (const char *str);
706
712 void set(TableSignatureID signature)
713 {
714 m_signatureID = signature;
715 }
716
722 void set(eSignature signature);
723
730 {
731 return m_signatureID;
732 }
733
740 {
741 return m_eSignature;
742 }
743
744 void getStr(char *str);
745
752 static const char *signatureToStr(TableSignatureID signatureID)
753 {
754 static char sigStr[5];
755
756 Signature sig(signatureID);
757
758 sig.getStr(sigStr);
759 sigStr[4] = '\0';
760
761 return sigStr;
762 }
763
770 bool equals(TableSignatureID signature)
771 {
772 return (signature == m_signatureID);
773 }
774
781 bool equals(Signature &signature)
782 {
783 return (m_signatureID == signature.m_signatureID);
784 }
785
793 {
794 return (m_signatureID < signature);
795 }
796
804 {
805 return (m_signatureID > signature);
806 }
807
814 bool equals(eSignature signature)
815 {
816 Signature sig(signature);
817
818 return equals(sig);
819 }
820
821 private:
822
823 TableSignatureID m_signatureID;
824 eSignature m_eSignature;
825 };
826
827 class CCIDMap;
829
848
881
886 static const CClassID &classID()
887 {
889 return id;
890 };
891
900 virtual bool getObfuscated() const = 0;
901
907 virtual bool getIsPSStandardFont() const = 0;
908
914 virtual bool getIsPDFStandardFont() const = 0;
915
925 virtual bool getEmbedded() const = 0;
926
935 virtual void setEmbedded(bool embedded) = 0;
936
944 virtual bool getSubsetted() const = 0;
945
955
964 virtual EDLSysString getPostScriptName(IEDLClassFactory *pFactory, int32 fontIndex) = 0;
965
974 virtual EDLSysString getFullName(IEDLClassFactory *pFactory, int32 fontIndex) = 0;
975
981
987
993 virtual IFontOpenTypeTableAccessorPtr getFontOpenTypeTableAccessor(uint32 fontIndex = 0) = 0;
994
1001 virtual IFontTrueTypeGlyphAccessorPtr getFontTrueTypeGlyphAccessor(uint32 fontIndex = 0, bool stripInstructions = false) = 0;
1002
1008 virtual uint16 getFontLicenseFromOS2Table(uint32 fontIndex = 0) = 0;
1009
1015 virtual bool getIsRestricted(uint32 fontIndex = 0) = 0;
1016
1023 virtual IDOMFontOpenTypeTTPtr createTrueTypeOnlyFontVersion(const ISessionPtr &ptrSession, bool regenerateStream) = 0;
1024
1038 virtual IDOMFontOpenTypePtr createSubsetFont(const ISessionPtr &ptrSession, const CEDLVector<uint16> &usedGlyphs, const CEDLVector<uint32> &usedUnicode) = 0;
1039
1048 virtual IDOMFontOpenTypePtr createRenamedFont(const ISessionPtr &ptrSession, const EDLSysString &fontName, uint32 fontIndex = 0) = 0;
1049
1064 virtual const CEDLSimpleBuffer &getOriginalOS2Table() const = 0;
1065
1084 virtual CCIDMapConstPtr getCidMap() const = 0;
1085
1104 virtual int32 getFlags() const = 0;
1105
1118 virtual const CEDLSimpleBuffer &getPanose() const = 0;
1119
1124 virtual void setCidMap(const CCIDMapConstPtr &cidMap) = 0;
1125
1142 virtual bool validateInstructions(const ISessionPtr &session, uint32 fontIndex = 0) = 0;
1143
1160 virtual IDOMFontOpenTypePtr stripInstructions(const ISessionPtr &session, uint32 fontIndex = 0, bool all = false) = 0;
1161
1176
1180 virtual void removeOriginalPdfEncoding() = 0;
1181};
1182#define edlobj2IDOMFontOpenType(src) edl_cast((IDOMFontOpenType *)nullptr, src)
1183
1184
1185
1192{
1193#define IDOMFontOpenTypeTTClassID 0x47fda935, 0xb25944b3, 0xbdc1061b, 0x7356cf50
1194
1195public:
1196
1201 static const CClassID &classID()
1202 {
1204 return id;
1205 };
1206
1214 {
1215 public:
1217 {
1218 fontIndex = 0;
1219 }
1221 };
1222
1228 virtual int32 writeFont(const IOutputStreamPtr &outStream) = 0;
1229
1237 virtual int32 writeFont(const EDLSysString &filePath, bool isTemplate = false)
1238 { return -1; }
1239
1240};
1242#define edlobj2IDOMFontOpenTypeTT(src) edl_cast((IDOMFontOpenTypeTT *)nullptr, src)
1243
1251{
1252#define IDOMType3FontClassID 0xb885316f, 0x7b114d80, 0x8fbe958c, 0xf1b34ab3
1253public:
1260 class Data : public CClassParams
1261 {
1262 public:
1263 JawsMako::IPDFDictionaryPtr fontDict;
1264 IEDLTempStorePtr tempStore;
1266 };
1267
1272 static const CClassID &classID()
1273 {
1274 static CClassID id(IDOMType3FontClassID);
1275 return id;
1276 };
1277
1284 virtual DOMid getId() const = 0;
1285
1291 virtual bool hasGlyph(const EDLSysString &glyphName) const = 0;
1292
1299 virtual IDOMGlyphPtr getGlyph(const EDLSysString &glyphName) const = 0;
1300
1306 virtual bool hasGlyph(uint32 codePoint) const = 0;
1307
1314 virtual IDOMGlyphPtr getGlyph(uint32 codePoint) const = 0;
1315
1321 virtual bool hasGlyph(IDOMGlyph::GlyphID glyphID) const = 0;
1322
1329 virtual IDOMGlyphPtr getGlyph(IDOMGlyph::GlyphID glyphID) const = 0;
1330
1335 virtual CDOMGlyphVect getGlyphs() const = 0;
1336
1340 virtual void deleteGlyphs() = 0;
1341
1346 virtual void addGlyph(const IDOMGlyphPtr &glyph) = 0;
1347
1352 virtual FRect getBBox() = 0;
1353
1359 virtual JawsMako::IPDFDictionaryPtr getFontDictionary() const = 0;
1360};
1362#define edlobj2IDOMType3Font(src) edl_cast((IDOMType3Font *)nullptr, src)
1363
1364
1366
1367
1368#endif /* IDOMFONT_H */
1369
An object to represent a 128-bit globally unique ID.
Definition objclassid.h:29
EDL Object Interface.
Definition iedlobject.h:31
Definition edlsimplebuffer.h:24
Definition edlvector.h:30
Initialization data.
Definition idomfont.h:339
IDOMFont Base Class.
Definition idomfont.h:300
For TrueType-based CIDFonts, the mapping from CIDs to GlyphIds for non-identity orderings.
Definition idomfont.h:836
Initialization data.
Definition idomfont.h:856
IDOMFontOpenType interface.
Definition idomfont.h:567
Definition idomfont.h:1192
Definition idomfont.h:59
The source for IDOMFont when sourced from an existing stream.
Definition idomfont.h:167
The font source for the class IDOMFont. This class describes the different ways fonts are constructed...
Definition idomfont.h:35
Interface for a font sourced from a converter that performs obfuscation and deobfuscation.
Definition idomfont.h:232
Initialization data.
Definition idomfont.h:132
An abstract interface for fonts sourced from a font stream filter.
Definition idomfont.h:104
Abstract interface for objects that can be hashed.
Definition idomhashable.h:28
Initialization data.
Definition idomfont.h:1261
Representation of a PostScript/PDF Type 3 Font. At present, the stream cannot be set,...
Definition idomfont.h:1251
EDL Factory Interface allows one part of the EDL infrastructure to register class creation methods id...
Definition iedlfactory.h:31
IEDLObject is an abstract base class that is used by all classes that are intended to be created via ...
Definition iedlobject.h:53
Definition idomfont.h:400
Definition idomfont.h:508
Definition idomfont.h:473
Base class Interface for all Reference Counted objects.
Definition ircobject.h:35
RectTmpl< double > FRect
Definition edlgeom.h:338
#define _END_EDL_DOM_NAMESPACE
Definition edlnamespaces.h:110
#define _BEGIN_EDL_DOM_NAMESPACE
Definition edlnamespaces.h:109
Simple buffer class which preserves the allocation context where the buffers were created.
std::string EDLSysString
Definition edlstring.h:158
EDLSysString EDLRawString
Definition edlstring.h:171
EDL "standard" types including known bit-length signed and unsigned integer type[def]s and definition...
unsigned short uint16
Definition edltypes.h:33
unsigned int uint32
Definition edltypes.h:34
#define EDL_API
Definition edltypes.h:86
unsigned long long uint64
Definition edltypes.h:35
signed int int32
Definition edltypes.h:29
signed long long int64
Definition edltypes.h:30
Simple template vector class for general use.
uint16 GlyphID
Holds the glyph ID of the glyph.
Definition idomglyph.h:80
bool equals(TableSignatureID signature)
Check if the signature matches a given TableSignatureID.
Definition idomfont.h:770
int32 supplement
Definition idomfont.h:840
#define IFontTrueTypeGlyphIDEnumeratorClassID
Definition idomfont.h:474
bool psStandardFont
Definition idomfont.h:871
Data()
Definition idomfont.h:858
IEDLClassFactory * pFactory
Definition idomfont.h:1265
virtual bool getEmbedded() const =0
Establishes whether the font is flagged for embeddeding.
Data()
Definition idomfont.h:64
virtual const EDLSysString & determineUri() const =0
Determines the URI based on the font source (underlying font sources may be searched)
bool equals(eSignature signature)
Check if the signature matches a given OpenType signature type.
Definition idomfont.h:814
JawsMako::IPDFDictionaryPtr fontDict
Definition idomfont.h:1263
virtual uint16 getFontLicenseFromOS2Table(uint32 fontIndex=0)=0
Gets the fsType field (embedded licensing information) from the OS/2 table.
virtual IInputStreamPtr getFontBaseStream() const =0
Return the base stream for this font, obtaining it from the font source.
virtual bool hasGlyph(uint32 codePoint) const =0
Determines if the font already has a glyph with the given unicode codepoint.
CEDLSimpleBuffer originalOS2Table
Definition idomfont.h:877
Signature(eSignature sSignature)
Construct a new Signature object of a given signature type.
Definition idomfont.h:689
Data()
Definition idomfont.h:1216
virtual IDOMGlyph::GlyphID getGlyphID()=0
Get the glyph ID of the current item.
virtual bool hasGlyph(IDOMGlyph::GlyphID glyphID) const =0
Determines if the font already has a glyph with the given glyph ID.
DECL_SMART_PTR(CCIDMap)
uint32 fontIndex
Definition idomfont.h:1220
static EDL_API CCIDMapPtr create(const EDLRawString &registry, const EDLRawString &ordering, int32 supplement, const CEDLVector< uint16 > &mapping)
#define IFontTrueTypeGlyphAccessorClassID
Definition idomfont.h:509
virtual const CEDLSimpleBuffer & getOriginalOS2Table() const =0
Obtain the original OS/2 Table, if present, that was included in the font.
eOriginalFontType originalFontType
Definition idomfont.h:876
static const CClassID & classID()
Retrieves the class id of IDOMFontOpenType.
Definition idomfont.h:886
bool subsetted
Definition idomfont.h:873
CEDLSimpleBuffer panose
Definition idomfont.h:875
IDOMFontSourcePtr inputFontSource
Definition idomfont.h:134
virtual CDOMGlyphVect getGlyphs() const =0
Obtain a vector of all of the glyphs present in this font.
virtual EDLSysString getFullName(IEDLClassFactory *pFactory, int32 fontIndex)=0
Get the "Full" Name of the font, from the font data itself. This is usually extracted from the 'name'...
#define IDOMFontSourceFromStreamClassID
Definition idomfont.h:168
virtual EDLSysString getPostScriptName(IEDLClassFactory *pFactory, int32 fontIndex)=0
Get the "PostScript" Name of the font, from the font data itself. This is usually extracted from the ...
virtual IDOMFontOpenTypePtr createRenamedFont(const ISessionPtr &ptrSession, const EDLSysString &fontName, uint32 fontIndex=0)=0
Get a renamed version of this font. An exception of type IEDLError is thrown on failure.
virtual IInputStreamPtr getStream() const =0
Retrieves the output stream of the processor.
virtual bool hasTable(TableSignatureID tableSignatureID)=0
Returns an indicator of the existence of a font table with the given signature.
static const CClassID & classID()
Retrieves the class id of IDOMFontSource.
Definition idomfont.h:74
virtual IDOMFontSourcePtr getFontSource() const =0
Get the font source of this font.
virtual bool getObfuscated() const =0
Returns true if font is obfuscated. Obfuscated fonts are only found in XPS Documents.
virtual void getCharacterMap(CCharacterMap &characterMap, uint32 fontIndex=0U)=0
Get the character map for this font.
virtual int32 tableWrite(const IOutputStreamPtr &outStream, TableSignatureID tableSignatureID, int32 startPos=0, int32 endPos=-1, bool withPadding=true)=0
Writes the table to the given output stream @ param outStream The output stream.
eOperation operation
The obfuscation or deobfuscation operation.
Definition idomfont.h:258
static EDL_API IDOMFontOpenTypePtr create(IEDLClassFactory *pFactory, const IInputStreamPtr &stream)
Simplified creator of a font from a stream. Throws an IEDLError exception on failure.
#define IDOMFontSourceObfuscationConverterClassID
Definition idomfont.h:233
uint64 streamLength
Definition idomfont.h:183
virtual bool getFromPcl() const =0
Determine if this source was created from PCL/5 or PCL/XL.
bool isGreaterThan(TableSignatureID signature)
Check if the signature is greater than a given TableSignatureID.
Definition idomfont.h:803
virtual bool haveMoreEnumerationItems()=0
Indicate whether there are more items in the enumeration.
void set(eSignature signature)
bool equals(Signature &signature)
Check if the signature matches a given OpenType signature.
Definition idomfont.h:781
virtual EDLRawString getOriginalPdfEncoding() const =0
Obtain the original PDF Font Encoding, if present.
virtual IDOMFontSourcePtr getInputFontSource() const =0
Get the underlying font source of this font stream processor.
EDLSysString uri
Definition idomfont.h:181
Signature(const char *str)
Construct a new Signature object with a given string.
Definition idomfont.h:678
eFontSourceType sourceType
Definition idomfont.h:62
virtual eFontType getFontType() const =0
Gets the font type. See eFontType for more information on font types.
bool pdfStandardFont
Definition idomfont.h:872
Signature(TableSignatureID signature)
Construct a new Signature object with a given TableSignatureID.
Definition idomfont.h:699
virtual eOriginalFontType getOriginalFontType()=0
Returns the original font type for this opentype font.
virtual int64 getStreamLength() const =0
Retrieves the stream length, if possible.
void set(TableSignatureID signature)
Set the TableSignatureID.
Definition idomfont.h:712
static const CClassID & classID()
Retrieves the class id of IDOMFontSourceObfuscationConverter.
Definition idomfont.h:265
bool obfuscated
Definition idomfont.h:869
virtual EDLRawString getRequestedFontName() const =0
Get the name of the font as requested by the input document. This is only useful for PDF and PostScri...
#define IDOMType3FontClassID
Definition idomfont.h:1252
virtual eOpenTypeFontType getOpenTypeFontType()=0
Returns the sub font type for this opentype font.
static const CClassID & classID()
Retrieves class id of IDOMFont.
Definition idomfont.h:348
bool fromPcl
Definition idomfont.h:184
EDLRawString registry
Definition idomfont.h:838
virtual uint32 getTableCheckSum(TableSignatureID tableSignatureID)=0
Returns the check sum of the table given by the signature An attempt to get the checksum of a non-exi...
virtual IDOMFontOpenTypePtr stripInstructions(const ISessionPtr &session, uint32 fontIndex=0, bool all=false)=0
Strip glyph instructions.
virtual IDOMGlyphPtr getGlyph(uint32 codePoint) const =0
Retrieves a glyph of the given unicode codepoint, if it exists. An exception with code EDL_ERR_TYPE3_...
virtual IDOMGlyphPtr getGlyph(const EDLSysString &glyphName) const =0
Retrieves a glyph of the given name. An exception with code EDL_ERR_TYPE3_GLYPH_NOT_FOUND will be thr...
static const CClassID & classID()
Retrieves class id of IFontTrueTypeGlyphAccessor.
Definition idomfont.h:516
virtual IDOMFontOpenTypePtr createSubsetFont(const ISessionPtr &ptrSession, const CEDLVector< uint16 > &usedGlyphs, const CEDLVector< uint32 > &usedUnicode)=0
Create a Subsetted version if this font.
virtual JawsMako::IPDFDictionaryPtr getFontDictionary() const =0
Fetch the font dictionary. Do not edit the returned dictionary.
virtual IInputStreamPtr getStream() const =0
Return the actual stream.
int32 flags
Definition idomfont.h:874
IInputStreamPtr stream
Definition idomfont.h:182
virtual bool getSubsetted() const =0
Requests if the font reports to be a subset.
eFontStreamFilterType
An enumeration type used to identify the source type of a font.
Definition idomfont.h:113
virtual bool hasGlyph(const EDLSysString &glyphName) const =0
Determines if the font already has a glyph with the given name.
virtual void setCidMap(const CCIDMapConstPtr &cidMap)=0
Set or clear the CIDMap for the font. Valid only for TrueType fonts.
Signature()
Construct a new Signature object.
Definition idomfont.h:667
static const char * signatureToStr(TableSignatureID signatureID)
Get a TableTableSignatureID as a string.
Definition idomfont.h:752
bool embedded
Definition idomfont.h:868
virtual int32 glyphDataWrite(const IOutputStreamPtr &outStream, IDOMGlyph::GlyphID glyphID)=0
Writes the glyph associated with the glyphID to the given output stream.
virtual CCIDMapConstPtr getCidMap() const =0
Obtain the CID Map for this font, if present.
virtual eFontSourceType getFontSourceType() const =0
Gets the font source type.
virtual IFontTrueTypeGlyphAccessorPtr getFontTrueTypeGlyphAccessor(uint32 fontIndex=0, bool stripInstructions=false)=0
Creates a TrueType glyph accessor.
virtual const CEDLSimpleBuffer & getPanose() const =0
Obtain the PDF Style Panose information, if present.
virtual void setEmbedded(bool embedded)=0
Sets whether of not the font is flagged for embeddeding.
virtual int32 tableCopy(unsigned char *buf, int32 bufSize, TableSignatureID tableSignatureId, bool withPadding=true)=0
Copies the table to the given buffer.
bool isLessThan(TableSignatureID signature)
Check if the signature is less than a given TableSignatureID.
Definition idomfont.h:792
virtual int32 getGlyphDataSize(IDOMGlyph::GlyphID glyphID)=0
Gets the size of the glyph data.
virtual DOMid getId() const =0
Retrieves the unique ID of this font. This ID is allocated on creation. Clones of this font will rece...
Data()
Definition idomfont.h:179
virtual bool nextEnumerationItem()=0
Get the next enumeration item.
virtual void setFontSource(const IDOMFontSourcePtr &fontSource)=0
Sets the font source for this font.
IDOMFontSourcePtr inputFontSource
The input font source for the converter.
Definition idomfont.h:257
virtual FRect getBBox()=0
Returns font's bounding box.
virtual bool getIsPSStandardFont() const =0
Establishes whether the font is a standard PostScript font.
virtual int32 writeFont(const IOutputStreamPtr &outStream)=0
Write the converted OpenType font to stream (CFF style Opentype fonts are converted to TTF style).
EDLRawString originalPdfEncoding
Definition idomfont.h:879
eOperation
type used to uniquely identify the conversion direction
Definition idomfont.h:242
static const CClassID & classID()
Retrieves class id of IFontOpenTypeTableEnumerator.
Definition idomfont.h:481
virtual bool hasGlyph(IDOMGlyph::GlyphID glyphID)=0
Indicate existance of glyph ID in the font.
virtual IDOMFontSourcePtr getInputFontSource() const =0
Get the input font source of this font stream processor.
virtual IDOMGlyphIDEnumeratorPtr getDependantGlyphIDEnumerator(IDOMGlyph::GlyphID glyphID)=0
Gets a glyphID enumerator which lists the dependant glyph IDs of the given glyphID.
virtual const EDLSysString & determineUri() const =0
Determines the URI based on the font source (underlying font sources may be searched)
virtual IFontOpenTypeTableAccessorPtr getFontOpenTypeTableAccessor(uint32 fontIndex=0)=0
Creates an OpenType font table accessor.
virtual const EDLSysString & determineUri() const =0
Determines the URI based on the font source (underlying font sources may be searched)
virtual const EDLSysString & determineUri() const =0
Determines the URI based on the font source (underlying font sources may be searched)
IEDLTempStorePtr tempStore
Definition idomfont.h:1264
virtual int32 writeFont(const EDLSysString &filePath, bool isTemplate=false)
Write the converted OpenType font to a file (CFF style Opentype fonts are converted to TTF style)....
Definition idomfont.h:1237
#define IFontOpenTypeTableAccessorClassID
Definition idomfont.h:401
#define IDOMFontOpenTypeClassID
Definition idomfont.h:568
virtual void addGlyph(const IDOMGlyphPtr &glyph)=0
Adds a glyph of the given name to the font.
void set(const char *str)
virtual bool validateInstructions(const ISessionPtr &session, uint32 fontIndex=0)=0
Validate glyph instructions.
IDOMFontSourcePtr fontSource
Definition idomfont.h:341
static const CClassID & classID()
Retrieves class id of IDOM.
Definition idomfont.h:1272
eSignature getSignatureType()
Get the Signature Type object.
Definition idomfont.h:739
virtual bool getIsPDFStandardFont() const =0
Establishes whether the font is a standard PDF font.
#define IDOMFontClassID
Definition idomfont.h:301
static const CClassID & classID()
Retrieves the class id of IDOMFontSourceFromStream.
Definition idomfont.h:191
virtual eFontStreamFilterType getFontStreamFilterType() const =0
Get the font stream filter type.
virtual IDOMFontOpenTypeTTPtr createTrueTypeOnlyFontVersion(const ISessionPtr &ptrSession, bool regenerateStream)=0
Create a TrueType only font from this OpenType font that may contain CFF fonts.
static const CClassID & classID()
Retrieves class id of IFontOpenTypeTableAccessor.
Definition idomfont.h:408
virtual void deleteGlyphs()=0
Delete the glyph collection from the font.
virtual bool getIsRestricted(uint32 fontIndex=0)=0
Is the font marked as restricted from embedding according to its license?
EDLRawString ordering
Definition idomfont.h:839
virtual int32 getFlags() const =0
Obtain the PDF FontDescriptor Style flags, if present.
virtual int32 getTableSize(TableSignatureID tableSignatureID, bool withPadding=true)=0
Returns the size of the table given by the signature. An attempt to get the size of a non-existent ta...
static const CClassID & classID()
Retrieves class id of IDOM.
Definition idomfont.h:1201
#define IDOMFontOpenTypeTTClassID
Definition idomfont.h:1193
virtual IDOMGlyphPtr getGlyph(IDOMGlyph::GlyphID glyphID) const =0
Retrieves a glyph of the given GlyphID, if it exists. An exception with code EDL_ERR_TYPE3_GLYPH_NOT_...
CCIDMapConstPtr cidMap
Definition idomfont.h:878
EDLRawString requestedFontName
Definition idomfont.h:870
virtual IInputStreamPtr getStream() const =0
Get the output stream of the processor.
virtual void removeOriginalPdfEncoding()=0
Clear the original PDF Font Encoding, if set.
TableSignatureID getSignatureID()
Get the Signature I D object.
Definition idomfont.h:729
CEDLVector< uint16 > mapping
Definition idomfont.h:841
@ eFontTypePCLXL
PCL/XL font.
Definition idomfont.h:328
@ eFontTypeUnknown
Unknown.
Definition idomfont.h:325
@ eFontTypePCL5
PCL5 font.
Definition idomfont.h:329
@ eFontTypeOpenType
OpenType font.
Definition idomfont.h:326
@ eFontType3
Type3 font.
Definition idomfont.h:327
@ eFontSourceTypeNone
Not specified.
Definition idomfont.h:45
@ eFontSourceTypeFont
Derived from a font.
Definition idomfont.h:48
@ eFontSourceTypeStream
Font data stream.
Definition idomfont.h:47
@ eFontSourceTypeStreamFilter
Font filter (converter)
Definition idomfont.h:46
@ eOriginalType2
Type 2 font - Usually a Type 1 encoded in a PDF in CFF form.
Definition idomfont.h:605
@ eOriginalType11
CIDFontType2 (CIDFont based on TrueType glyph descriptions)
Definition idomfont.h:608
@ eOriginalPclTrueType
A TrueType font originally embedded in a PCL/5 or PCL/XL document.
Definition idomfont.h:609
@ eOriginalTypeOpenType
Originally OpenType format.
Definition idomfont.h:603
@ eOriginalType42
Type42/Truetype from PS/PDF.
Definition idomfont.h:606
@ eOriginalType9
CIDFontType0 (CIDFont based on Type 1 CharStrings)
Definition idomfont.h:607
@ eOriginalType1
Type 1 font.
Definition idomfont.h:604
@ eFontStreamFilterTypeNone
Not specified.
Definition idomfont.h:114
@ eFontStreamFilterTypeObfuscation
Obfuscation filter.
Definition idomfont.h:115
@ eOpenTypeFontTypeUnknown
Unknown font type.
Definition idomfont.h:586
@ eOpenTypeFontTypeTTF
TrueType font.
Definition idomfont.h:587
@ eOpenTypeFontTypeTTC
TrueType collections.
Definition idomfont.h:589
@ eOpenTypeFontTypeCFF
Compact font format.
Definition idomfont.h:588
@ eSignaturePost
PostScript table.
Definition idomfont.h:654
@ eSignatureFpgm
Font program.
Definition idomfont.h:649
@ eSignatureVhea
Vertical header.
Definition idomfont.h:645
@ eSignatureBASE
The Baseline table for glyph alignment.
Definition idomfont.h:638
@ eSignatureTTC
Truetype collections font signature.
Definition idomfont.h:634
@ eSignatureName
Naming table.
Definition idomfont.h:647
@ eSignaturePrep
CVT Program.
Definition idomfont.h:655
@ eSignatureCFF
Opentype CFF font signature.
Definition idomfont.h:633
@ eSignatureMAXP
Maximum profile.
Definition idomfont.h:646
@ eSignatureGlyf
Glyph data.
Definition idomfont.h:652
@ eSignatureCvt
Control Value Table.
Definition idomfont.h:648
@ eSignatureHead
Font header.
Definition idomfont.h:643
@ eSignatureLoca
Index to location.
Definition idomfont.h:653
@ eSignatureHmtx
Horizontal metrics.
Definition idomfont.h:657
@ eSignatureTTF
Truetype font signature.
Definition idomfont.h:632
@ eSignatureEnd
Definition idomfont.h:660
@ eSignatureGdir
Indicates that this is an incremental font.
Definition idomfont.h:651
@ eSignatureVmtx
Vertical metrics.
Definition idomfont.h:658
@ eSignatureLTSH
The Linear Threshold table for glyph positioning.
Definition idomfont.h:641
@ eSignatureNone
Definition idomfont.h:629
@ eSignatureGSUB
The glyph substitution table.
Definition idomfont.h:640
@ eSignatureHhea
Horizontal header.
Definition idomfont.h:644
@ eSignatureVORG
Vertical origin table (for CFF based fonts)
Definition idomfont.h:659
@ eSignatureGasp
Grid fitting and scan conversion procedure table.
Definition idomfont.h:650
@ eSignatureOS2
OS/2 and Windows metrics.
Definition idomfont.h:642
@ eSignatureCMAP
Character to glyph mapping.
Definition idomfont.h:639
@ eSignatureMort
The metamorphosis table for ligatures, contextual or non-contextual substitutions,...
Definition idomfont.h:656
@ eDeobfuscate
Deobfuscation.
Definition idomfont.h:244
@ eObfuscate
Obfuscation.
Definition idomfont.h:243
EDL::uint64 DOMid
Type used to uniquely idenitify a DOM node.
Definition idomid.h:17
std::map< CharCode, IDOMGlyph::GlyphID > CCharacterMap
Map type used for storing character code to glyph ID mappings.
Definition idomfont.h:316
eFontType
type used to uniquely identify the type of font
Definition idomfont.h:324
eFontSourceType
type used to uniquely identify the source type of a font
Definition idomfont.h:44
eOriginalFontType
Type used to uniquely identify the original type of Font. In the PostScript/PDF inputs,...
Definition idomfont.h:602
eOpenTypeFontType
Type used to uniquely identify the type of OpenType font.
Definition idomfont.h:585
uint32 TableSignatureID
type used to uniquely identify an opentype font signature
Definition idomfont.h:396
eSignature
Type used to uniquely identify the known open type signatures.
Definition idomfont.h:628
uint32 CharCode
type used to uniquely identify a character code
Definition idomfont.h:309
#define IDOMFontSourceClassID
Definition idomfont.h:36
CEDLVector< IDOMGlyphPtr > CDOMGlyphVect
Definition idomglyph.h:36
#define DECL_SMART_PTR(cls)
Definition smartptr.h:211