IDOMFontOpenType interface. More...
#include <idomfont.h>
Classes | |
class | CCIDMap |
For TrueType-based CIDFonts, the mapping from CIDs to GlyphIds for non-identity orderings. More... | |
class | Data |
Initialization data. More... | |
Public Types | |
enum | eOpenTypeFontType { eOpenTypeFontTypeUnknown , eOpenTypeFontTypeTTF , eOpenTypeFontTypeCFF , eOpenTypeFontTypeTTC } |
Type used to uniquely identify the type of OpenType font. More... | |
enum | eOriginalFontType { eOriginalTypeOpenType , eOriginalType1 , eOriginalType2 , eOriginalType42 , eOriginalType9 , eOriginalType11 , eOriginalPclTrueType } |
Type used to uniquely identify the original type of Font. In the PostScript/PDF inputs, most font types are converted to OpenType before insertion into the DOM. This allows the ability to discover what the original type was. More... | |
Public Types inherited from IDOMFont | |
enum | eFontType { eFontTypeUnknown , eFontTypeOpenType , eFontType3 , eFontTypePCLXL , eFontTypePCL5 } |
type used to uniquely identify the type of font More... | |
typedef uint32 | CharCode |
type used to uniquely identify a character code | |
typedef std::map< CharCode, IDOMGlyph::GlyphID > | CCharacterMap |
Map type used for storing character code to glyph ID mappings. | |
Public Types inherited from IDOMFontSource | |
enum | eFontSourceType { eFontSourceTypeNone , eFontSourceTypeStreamFilter , eFontSourceTypeStream , eFontSourceTypeFont } |
type used to uniquely identify the source type of a font More... | |
Public Member Functions | |
virtual bool | getObfuscated () const =0 |
Returns true if font is obfuscated. Obfuscated fonts are only found in XPS Documents. | |
virtual bool | getIsPSStandardFont () const =0 |
Establishes whether the font is a standard PostScript font. | |
virtual bool | getIsPDFStandardFont () const =0 |
Establishes whether the font is a standard PDF font. | |
virtual bool | getEmbedded () const =0 |
Establishes whether the font is flagged for embeddeding. | |
virtual void | setEmbedded (bool embedded)=0 |
Sets whether of not the font is flagged for embeddeding. | |
virtual bool | getSubsetted () const =0 |
Requests if the font reports to be a subset. | |
virtual EDLRawString | getRequestedFontName () const =0 |
Get the name of the font as requested by the input document. This is only useful for PDF and PostScript input. If a font has to be substituted for another requested font, this will return the name of the font the input desired. The encoding of this font name is not defined. | |
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 'name' OpenType table, but may be synthesized if the name cannot be obtained. | |
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' OpenType table, but may be synthesized if the name cannot be obtained. | |
virtual eOpenTypeFontType | getOpenTypeFontType ()=0 |
Returns the sub font type for this opentype font. | |
virtual eOriginalFontType | getOriginalFontType ()=0 |
Returns the original font type for this opentype font. | |
virtual IFontOpenTypeTableAccessorPtr | getFontOpenTypeTableAccessor (uint32 fontIndex=0)=0 |
Creates an OpenType font table accessor. | |
virtual IFontTrueTypeGlyphAccessorPtr | getFontTrueTypeGlyphAccessor (uint32 fontIndex=0, bool stripInstructions=false)=0 |
Creates a TrueType glyph accessor. | |
virtual uint16 | getFontLicenseFromOS2Table (uint32 fontIndex=0)=0 |
Gets the fsType field (embedded licensing information) from the OS/2 table. | |
virtual bool | getIsRestricted (uint32 fontIndex=0)=0 |
Is the font marked as restricted from embedding according to its license? | |
virtual IDOMFontOpenTypeTTPtr | createTrueTypeOnlyFontVersion (const ISessionPtr &ptrSession, bool regenerateStream)=0 |
Create a TrueType only font from this OpenType font that may contain CFF fonts. | |
virtual IDOMFontOpenTypePtr | createSubsetFont (const ISessionPtr &ptrSession, const CEDLVector< uint16 > &usedGlyphs, const CEDLVector< uint32 > &usedUnicode)=0 |
Create a Subsetted version if this font. | |
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 const CEDLSimpleBuffer & | getOriginalOS2Table () const =0 |
Obtain the original OS/2 Table, if present, that was included in the font. | |
virtual CCIDMapConstPtr | getCidMap () const =0 |
Obtain the CID Map for this font, if present. | |
virtual int32 | getFlags () const =0 |
Obtain the PDF FontDescriptor Style flags, if present. | |
virtual const CEDLSimpleBuffer & | getPanose () const =0 |
Obtain the PDF Style Panose information, if present. | |
virtual void | setCidMap (const CCIDMapConstPtr &cidMap)=0 |
Set or clear the CIDMap for the font. Valid only for TrueType fonts. | |
virtual bool | validateInstructions (const ISessionPtr &session, uint32 fontIndex=0)=0 |
Validate glyph instructions. | |
virtual IDOMFontOpenTypePtr | stripInstructions (const ISessionPtr &session, uint32 fontIndex=0, bool all=false)=0 |
Strip glyph instructions. | |
Public Member Functions inherited from IDOMFont | |
virtual eFontType | getFontType () const =0 |
Gets the font type. See eFontType for more information on font types. | |
virtual IDOMFontSourcePtr | getFontSource () const =0 |
Get the font source of this font. | |
virtual void | setFontSource (const IDOMFontSourcePtr &fontSource)=0 |
Sets the font source for this font. | |
virtual IInputStreamPtr | getFontBaseStream () const =0 |
Return the base stream for this font, obtaining it from the font source. | |
virtual void | getCharacterMap (CCharacterMap &characterMap, uint32 fontIndex=0U)=0 |
Get the character map for this font. | |
Public Member Functions inherited from IDOMFontSource | |
virtual eFontSourceType | getFontSourceType () const =0 |
Gets the font source type. | |
virtual const EDLSysString & | determineUri () const =0 |
Determines the URI based on the font source (underlying font sources may be searched) | |
Public Member Functions inherited from IEDLObject | |
virtual const CClassID & | getClassID () const =0 |
Returns class ID of IEDLObject. | |
virtual bool | init (CClassParams *pData) |
The init() method is called to perform any post-construction initialization of an IEDLObject that has been created by the EDL class factory, before it is actually returned by the factory. | |
virtual bool | clone (IEDLObjectPtr &ptrObject, IEDLClassFactory *pFactory) |
Create a copy of EDLObject. | |
Public Member Functions inherited from IRCObject | |
virtual void | addRef () const =0 |
Increases the reference count of the actual object pointed to. This would take place during an assignment or copying. | |
virtual bool | decRef () const =0 |
Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to. | |
virtual int32 | getRefCount () const =0 |
Retrieve the current reference count of the actual object pointed to. | |
Public Member Functions inherited from IDOMHashable | |
virtual | ~IDOMHashable () |
Virtual destructor. | |
virtual bool | hash (uint64 &hash)=0 |
Retrieve a hash for this object. | |
virtual uint64 | hashE () |
As hash(), but throws an exception if the operation fails. | |
Static Public Member Functions | |
static EDL_API IDOMFontOpenTypePtr | create (IEDLClassFactory *pFactory, const IInputStreamPtr &stream) |
Simplified creator of a font from a stream. Throws an IEDLError exception on failure. | |
static const CClassID & | classID () |
Retrieves the class id of IDOMFontOpenType. | |
Static Public Member Functions inherited from IDOMFont | |
static const CClassID & | classID () |
Retrieves class id of IDOMFont. | |
Static Public Member Functions inherited from IDOMFontSource | |
static const CClassID & | classID () |
Retrieves the class id of IDOMFontSource. | |
Additional Inherited Members | |
Protected Member Functions inherited from IRCObject | |
virtual | ~IRCObject () |
Virtual destructor. | |
IDOMFontOpenType interface.
|
inlinestatic |
Retrieves the class id of IDOMFontOpenType.
|
static |
Simplified creator of a font from a stream. Throws an IEDLError exception on failure.
pFactory | EDL class factory to use. |
stream | The font stream. |
|
pure virtual |
Get a renamed version of this font. An exception of type IEDLError is thrown on failure.
ptrSession | A pointer to the EDL session. |
fontName | The desired font name |
fontIndex | The index of the font, if the font being renamed is a TrueType collection. The default is zero. |
|
pure virtual |
Create a Subsetted version if this font.
Provide a vector of glyph IDs and/or unicode codepoints, and a subset font containing only those glyphs required will be generated. Currently only fonts with 3,0 or 3,1 format 4 subtables or a 3,10 format 12 subtable are supported. Glyphs used by composite glyphs that are to be retained in the subfont will be automatically included. Glyphs or codepoints that are out of range will be ignored.
ptrSession | A pointer to the EDL session. |
usedGlyphs | A vector of glyph IDs that should be retained in the subset font. |
usedUnicode | A vector of unicode code points whose underlying glyphs should be retained in the subset font. |
|
pure virtual |
Create a TrueType only font from this OpenType font that may contain CFF fonts.
ptrSession | A pointer to the EDL session. |
regenerateStream | Determines whether the stream should be regenerated |
|
pure virtual |
Obtain the CID Map for this font, if present.
The CIDMap in a PDF CID font describes the mapping from PDF CIDs to glyph IDs. In PDF, CIDs may come from a particular ordering and supplement. That is, the CIDs conform to a known and understood character set. This information is only useful for creating PDF output where the CID information needs to be preserved for best interoperability, especially if the font is not to be embedded. This information is not required to use this font. Mako's PDF input will only create this entry for CID fonts where the CIDMap is present and uses an ordering other than Identity. Only relevant for TrueType-based CID Fonts.
|
pure virtual |
Establishes whether the font is flagged for embeddeding.
Inputs will set this to true if the font was embedded in the input or false otherwise. Outputs will honour this setting, if possible, or not overridden. Currently this will only occur for PDF and PS output.
|
pure virtual |
Obtain the PDF FontDescriptor Style flags, if present.
The flags are described in the PDF specification. Here the flags are masked to the flags that affect style: * FixedPitch (bit 1) * Serif (bit 2) * Script (bit 4) * Italic (bit 7) * AllCap (bit 17) * SmallCap (bit 18) * ForceBold (bit 19) Currently only present for TrueType-based CID Fonts.
|
pure virtual |
Gets the fsType field (embedded licensing information) from the OS/2 table.
fontIndex | The index of the font |
|
pure virtual |
Creates an OpenType font table accessor.
fontIndex | The index of the font - only used for TTC fonts. |
|
pure virtual |
Creates a TrueType glyph accessor.
fontIndex | The index of the font - only used for TTC fonts. |
stripInstructions | Determines whether instructions are stripped. Default is false |
|
pure virtual |
Get the "Full" Name of the font, from the font data itself. This is usually extracted from the 'name' OpenType table, but may be synthesized if the name cannot be obtained.
fontIndex | The index of the desired font (if a TrueType collection) |
pFactory | A pointer to an EDL Class factory. |
|
pure virtual |
Establishes whether the font is a standard PDF font.
|
pure virtual |
Establishes whether the font is a standard PostScript font.
|
pure virtual |
Is the font marked as restricted from embedding according to its license?
fontIndex | The index of the font |
|
pure virtual |
Returns true if font is obfuscated. Obfuscated fonts are only found in XPS Documents.
Embedded font obfuscation is a means of preventing end users from using standard ZIP utilities to extract fonts from XPS format documents and install them on their own systems.
|
pure virtual |
Returns the sub font type for this opentype font.
|
pure virtual |
Returns the original font type for this opentype font.
|
pure virtual |
Obtain the original OS/2 Table, if present, that was included in the font.
Currently this information is only populated for PDF input, and only if the font had an OS/2 table. OS/2 information in fonts embedded in PDF tends to be problematic, and as such, much of the OS/2 table is regenerated partially or completely by PDF input. For uses which require the original OS/2 table data, it is made available here. Please note that this information is not used when font hashing is performed.
|
pure virtual |
Obtain the PDF Style Panose information, if present.
Please see the PDF and Panose documentation for details. If present, this is a 12 byte buffer describing style information which is useful for font substitution. Currently only present for TrueType-based CID Fonts.
|
pure virtual |
Get the "PostScript" Name of the font, from the font data itself. This is usually extracted from the 'name' OpenType table, but may be synthesized if the name cannot be obtained.
pFactory | A pointer to an EDL Class factory. |
fontIndex | The index of the desired font (if a TrueType collection) |
|
pure virtual |
Get the name of the font as requested by the input document. This is only useful for PDF and PostScript input. If a font has to be substituted for another requested font, this will return the name of the font the input desired. The encoding of this font name is not defined.
|
pure virtual |
Requests if the font reports to be a subset.
Currently, this is only set to true for PDF input, where the PDF indicates that the font is subset.
|
pure virtual |
Set or clear the CIDMap for the font. Valid only for TrueType fonts.
cidMap | The CID map to set. Ownership is taken by the font. |
|
pure virtual |
Sets whether of not the font is flagged for embeddeding.
Outputs will honour this setting, if possible, or not overridden. In particular, if a font is a standard font in the output format being used, this setting will be ignored. Currently this will only occur for PDF and PS output.
embedded | Set to true to flag the font for embedding |
|
pure virtual |
Strip glyph instructions.
Applies only to TrueType glyphs. This will attempt to strip some cases of broken instructions (hints) from a font.
Note that this it cannot detect issues seen only when rendering at a specific resolution and point size.
session | A pointer to the session. |
fontIndex | The index of the font - only used for TTC fonts. |
all | Whether to strip all instructions from the font, or only instructions found to be invalid (the default). |
|
pure virtual |
Validate glyph instructions.
Applies only to TrueType glyphs. This will attempt to detect some cases of broken instructions (hints) by rendering each glyph in the font and return a boolean value to indicate if any issues were found.
Note that while this function may be useful to detect general issues with fonts/glyph instructions it cannot detect issues seen only when rendering at a specific resolution and point size.
session | A pointer to the session. |
fontIndex | The index of the font - only used for TTC fonts. |