UglyToad.PdfPig.Fonts The global metrics for a font program and the metrics of each character. Version of the Adobe Font Metrics specification used to generate this file. Any comments in the file. The writing directions described by these metrics. Font name. Font full name. Font family name. Font weight. Minimum bounding box for all characters in the font. Font program version identifier. Font name trademark or copyright notice. String indicating the default encoding vector for this font program. Common ones are AdobeStandardEncoding and JIS12-88-CFEncoding. Special font programs might state FontSpecific. Describes the mapping scheme. The bytes value of the escape-character used if this font is escape-mapped. Describes the character set of this font. The number of characters in this font. Whether this is a base font. A vector from the origin of writing direction 0 to direction 1. Whether is the same for every character in this font. Usually the y-value of the top of capital 'H'. Usually the y-value of the top of lowercase 'x'. Usually the y-value of the top of lowercase 'd'. Usually the y-value of the bottom of lowercase 'p'. Distance from the baseline for underlining. Width of the line for underlining. Angle in degrees counter-clockwise from the vertical of the vertical linea. Zero for non-italic fonts. If present all characters have this width and height. Horizontal stem width. Vertical stem width. Metrics for the individual characters. Create a new . Name of the font as seen by PostScript. The full text name of the font. The name of the typeface family for the font. The weight of the font. Angle in degrees counter-clockwise from vertical of vertical strokes of the font. Whether the font is monospaced or not. The dimensions of the font bounding box. Distance from the baseline for underlining. The stroke width for underlining. Version identifier for the font program. Font name trademark or copyright notice. Code describing mapping scheme for a non base font. The character set of this font. The y-value of the top of a capital H. The y-value of the top of lowercase x. Generally the y-value of the top of lowercase d. The y-value of the bottom of lowercase p. Width of horizontal stems. Width of vertical stems. The x and y components of the width vector of the font's characters. Presence implies that IsFixedPitch is true. The horizontal width. The vertical width. Create a new . An from an Adobe Font Metrics file. Create a new . The metrics for an individual character. Character code. PostScript language character name. Width. Width for writing direction 0. Width for writing direction 1. Vector from origin of writing direction 1 to origin of writing direction 0. Character bounding box. Ligature information. Create a new . A ligature in an Adobe Font Metrics individual character. The character to join with to form a ligature. The current character. Create a new . Parses files in the Adobe Font Metrics (AFM) format. This is a comment in a AFM file. This is the constant used in the AFM file to start a font metrics item. This is the constant used in the AFM file to end a font metrics item. The font name. The full name. The family name. The weight. The bounding box. The version of the font. The notice. The encoding scheme. The mapping scheme. The escape character. The character set. The characters attribute. Whether this is a base font. The V Vector attribute. Whether V is fixed. The cap height. The X height. The ascender attribute. The descender attribute. The underline position. The underline thickness. The italic angle. The character width. Determines if fixed pitch. The start of the character metrics. The end of the character metrics. The character metrics c value. The character metrics value. The character metrics value. The character metrics value. The character metrics value. The character metrics value. The character metrics value. The character metrics value. The character metrics value. The character metrics value. The character metrics value. The character metrics value. The character metrics value. The character metrics value. The character metrics value. The character metrics value. The character metrics value. This is the start of the track kern data. This is the end of the track kern data. This is the start of the kern data. This is the end of the kern data. This is the start of the kern pairs data. This is the end of the kern pairs data. This is the start of the kern pairs data. This is the start of the kern pairs data. This is the start of the composite data section. This is the end of the composite data section. This is a composite character. This is a composite character part. This is a kern pair. This is a kern pair. This is a kern pair. This is a kern pair. Parse the font metrics from the input bytes. A vector in the Adobe Font Metrics. The x component of the vector. The y component of the vector. Create a new . The meaning of the metric sets field. Writing direction 0 only. Writing direction 1 only. Writing direction 0 and 1. Holds common properties between Adobe Type 1 and Compact Font Format private dictionaries. Default value of . Default value of . Default value of . Default value of . Default value of . Required. An array containing an even number of integers. The first pair is the baseline overshoot position and the baseline. All following pairs describe top-zones. Optional: Pairs of integers similar to . These only describe bottom zones. Optional: Integer pairs similar to however these are used to enforce consistency across a font family when there are small differences (<1px) in font alignment. Optional: Integer pairs similar to however these are used to enforce consistency across a font family with small differences in alignment similarly to . Optional: The point size at which overshoot suppression stops. The value is a related to the number of pixels tall that one character space unit will be before overshoot suppression is switched off. Overshoot suppression enforces features to snap to alignment zones when the point size is below that affected by this value. Default: 0.039625 A blue scale of 0.039625 switches overshoot suppression off at 10 points on a 300 dpi device using the formula (for 300 dpi): BlueScale = (pointsize - 0.49)/240 For example, if you wish overshoot suppression to turn off at 11 points on a 300-dpi device, you should set BlueScale to (11 − 0.49) ÷ 240 or 0.04379 Optional: The character space distance beyond the flat position of alignment zones at which overshoot enforcement occurs. Default: 7 Optional: The number of character space units to extend an alignment zone on a horizontal stem. If the top or bottom of a horizontal stem is within BlueFuzz units outside a top-zone then the stem top/bottom is treated as if it were within the zone. Default: 1 Optional: The dominant width of horizontal stems vertically in character space units. Optional: The dominant width of vertical stems horizontally in character space units. Optional: Up to 12 numbers with the most common widths for horizontal stems vertically in character space units. Optional: Up to 12 numbers with the most common widths for vertical stems horizontally in character space units. Optional: At small sizes at low resolutions this controls whether bold characters should appear thicker using special techniques. Optional: Language group 0 includes Latin, Greek and Cyrillic as well as similar alphabets. Language group 1 includes Chinese, Japanese Kanji and Korean Hangul as well as similar alphabets. Default: 0 Optional: The limit for changing the size of a character bounding box for 1 counters during font processing. Creates a new . The builder used to gather property values. A mutable builder which can set any property of the private dictionary and performs no validation. . . . . . . . . . . . . . . The stack of numeric operands currently active in a CharString. The current size of the stack. Whether it's possible to pop a value from either end of the stack. Remove and return the value from the top of the stack. The value from the top of the stack. Remove and return the value from the bottom of the stack. The value from the bottom of the stack. Adds the value to the top of the stack. The value to add. Removes all values from the stack. An empty Charset for CID fonts which map from Character Id to Glyph Id without using strings. A predefined Charset for a Compact Font Format font with Charset Id of 1. A predefined Charset for a Compact Font Format font with Charset Id of 2. A Charset from a Compact Font Format font file best for fonts with relatively unordered string ids. A Charset from a Compact Font Format font file best for fonts with well ordered string ids. A Charset from a Compact Font Format font file best for fonts with a large number of well ordered string ids. A predefined Charset for a Compact Font Format font with Charset Id of 0. Represents the deferred execution of a Type 2 charstring command. The name of the command to run. See the Type 2 charstring specification for the possible command names. Create a new . The name of the command. Minimum number of argument which must be on the stack or -1 if no checking The action to execute when evaluating the command. This modifies the . Evaluate the command. The current . The context used and updated when interpreting the commands for a charstring. The numbers currently on the Type 2 Build Char stack. The current path. The current location of the active point. If the charstring has a width other than that of defaultWidthX it must be specified as the first number in the charstring, and encoded as the difference from nominalWidthX. Every character path and subpath must begin with one of the moveto operators. If the current path is open when a moveto operator is encountered, the path is closed before performing the moveto operation. See 4.1 Path Construction Operators in 'The Type 2 Charstring Format, Technical Note #5177', 16 March 2000 Decodes the commands and numbers making up a Type 2 CharString. A Type 2 CharString extends on the Type 1 CharString format. Compared to the Type 1 format, the Type 2 encoding offers smaller size and an opportunity for better rendering quality and performance. The Type 2 charstring operators are (with one exception) a superset of the Type 1 operators. A Type 2 charstring program is a sequence of unsigned 8-bit bytes that encode numbers and operators. The byte value specifies a operator, a number, or subsequent bytes that are to be interpreted in a specific manner The Type 2 interpretation of a number with an initial byte value of 255 differs from how it is interpreted in the Type 1 format and 28 has a special meaning. Stores the decoded command sequences for Type 2 CharStrings from a Compact Font Format font as well as the local (per font) and global (per font set) subroutines. The CharStrings are lazily evaluated. The decoded charstrings in this font. Evaluate the CharString for the character with a given name returning the path constructed for the glyph. The name of the character to retrieve the CharString for. The default width for the glyph from the font's private dictionary. The nominal width which individual glyph widths are encoded as the difference from. A for the glyph. The ordered list of numbers and commands for a Type 2 charstring or subroutine. Since Type 2 CharStrings may define their width as the first argument (as a delta from the font's nominal width X) we can retrieve both details for the Type 2 glyph. The path of the glyph. The width of the glyph as a difference from the nominal width X for the font. Optional. Create a new . Returns the PostScript name of the glyph for the given character code. Provides access to the raw bytes of this Compact Font Format file with utility methods for reading data types from it. The current position in the data. The length of the data. Create a new . Read a string of the specified length. Read Card8 format. Read Card16 format. Read Offsize. Read Offset. Read byte. Peek the next byte without advancing the data. Whether there's more data to read in the input. Move to the given offset from the beginning. Read long. Read sid. Read byte array of given length. Create a new from this data with a snapshot at the position and length. Table of character codes and their corresponding sid. A Compact Font Format (CFF) font. The encoding for this font. The font matrix for this font. The value of Weight from the top dictionary or . The value of Italic Angle from the top dictionary or 0. Get the bounding box for the character with the given name. Get the pdfpath for the character with the given name. GetCharacterPath Get the default width of x for the character. Get the nominal width of x for the character. A Compact Font Format (CFF) font program as described in The Compact Font Format specification (Adobe Technical Note #5176). A CFF font may contain multiple fonts and achieves compression by sharing details between fonts in the set. The decoded header table for this font. The individual fonts contained in this font keyed by name. The first font contained in the collection. Create a new . The header table for the font. The fonts in this font program. Get the first font matrix in the font collection. Get the bounding box for a character if the font contains a corresponding glyph. Get the name for the character with the given character code from the font. The header table for the binary data of a Compact Font Format file. The major version of this font format. Starting at 1. The minor version of this font format. Starting at 0. Indicates extensions to the format which are undetectable by readers which do not support them. Indicates the size of this header in bytes so that future changes to the format may include extra data after the field. Specifies the size of all offsets relative to the start of the data in the font. Creates a new . The major version of this font format. The minor version of this font format. Indicates the size of this header in bytes so that future changes to the format may include extra data after the offsetSize field. Specifies the size of all offsets relative to the start of the data in the font. Parse the Compact Font Format (CFF). Read the Compact Font Format font from the input data. Reads indexed string data. Table of character codes and their corresponding sid. Compatibility entry. The offset in bytes for the local subroutine index in this font. The value is relative to this private dictionary. If a glyph's width equals the default width X it can be omitted from the charstring. If not equal to , Glyph width is computed by adding the charstring width to the nominal width X value. Create a new . The builder used to gather property values. If a glyph's width equals the default width X it can be omitted from the charstring. If not equal to , Glyph width is computed by adding the charstring width to the nominal width X value. Defines the format of the CharString data contained within a Compact Font Format font. The Type 1 CharString format as defined by the Adobe Type 1 Font Format. The Type 2 CharString format as defined by Adobe Technical Note #5177. This is the default type. Thrown when a PDF contains an invalid compressed data stream. An encoding built in to a TrueType font. Create a new . Created by combining a base encoding with the differences. Create a new . Maps character codes to glyph names from a PostScript encoding. Mutable code to name map. Maps from character codes to names. Mutable name to code map. Maps from names to character cocdes. The name of this encoding. Whether this encoding contains a code for the name. Whether this encoding contains a name for the code. Get the character name corresponding to the given code. Get the character code from name Character name (eg. euro, ampersand, A, space) -1 if not found otherwise the character code Add a character code and name pair. Get a known encoding instance with the given name. Table of octal character codes and their corresponding names. Similar to the with 15 additional entries. The single instance of this encoding. The Mac Roman encoding. Table of octal character codes and their corresponding names. The single instance of this encoding. Create a new The standard PDF encoding. The single instance of the standard encoding. Symbol encoding. EncodingTable for Symbol PDF Spec 1.7 Page 1013 https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.7old.pdf#page1013 Note spec has code values as octal (base 8) with leading zero (supported in 'C' and 'Java') but not by C# Code values are already converted to base 10 prior to compile. Single instance of this encoding. Windows ANSI encoding. The encoding table is taken from the Appendix of the specification. These codes are in octal. Single instance of this encoding. Zapf Dingbats encoding. EncodingTable for ZapfDingbats PDF Spec 1.7 Page 1016 https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.7old.pdf#page1016 Note spec has code values are octal (base 8) with leading zero (supported in 'C' and 'Java') but not by C# Code values are already converted to base 10 prior to compile. Original octal values in comments on each line. Single instance of this encoding. A list which maps PostScript glyph names to unicode values. The Adobe Glyph List. An extension to the Adobe Glyph List. Zapf Dingbats. Get the name for the unicode code point value. Get the unicode value for the glyph name. The exception thrown when an error is encountered parsing a font from the PDF document. This occurs where the format of the font program or dictionary does not meet the specification. There are 14 special Type 1 fonts which must be available. The list of PostScript names for these is given in the remarks section. A font dictionary for a standard 14 font may omit the FirstChar, LastChar, Widths and FontDescriptor entries. The metrics for these fonts are provided by the Adobe Font Metrics (AFM) files. Standard 14 fonts are deprecated as of PDF 1.5+ however support is still required for backwards compatibility.
The standard 14 are:
Times−Roman
Helvetica
Courier
Symbol
Times−Bold
Helvetica−Bold
Courier−Bold
ZapfDingbats
Times−Italic
Helvetica−Oblique
Courier−Oblique
Times−BoldItalic
Helvetica−BoldOblique
Courier−BoldOblique
Get the Adobe Font Metrics as for a font. If the font is not found this returns . Get the Adobe Font Metrics as for a Standard14 font. Determines if a font with this name is a standard 14 font. Returns the set of Standard 14 font names, including additional names. Get the official Standard 14 name of the actual font which the given font name maps to. The Standard 14 fonts included by default in PDF readers. Times New Roman. Times New Roman Bold. Times New Roman Italic. Times New Roman Bold and Italic. Helvetica. Helvetica Bold. Helvetica Oblique (Italic without different font shapes). Helvetica Bold and Oblique. Courier. Courier Bold. Courier Oblique. Courier Bold and Oblique. Symbol. Zapf Dingbats. Used to find named fonts from the host operating/file system. Get the TrueType font with the specified name. The instance of . Create a new . Specifies the meaning of the transformation entries for a composite glyph definition. If set arguments are words, otherwise they are bytes. If set arguments are x y offset values, otherwise they are points. If arguments are x y offset values and this is set then the values are rounded to the closest grid lines before addition to the glyph. If set the scale value is read in 2.14 format (between -2 to < 2) and the glyph is scaled before grid-fitting. Otherwise scale is 1. Reserved for future use, should be set to 0. Indicates that there is a glyph following the current one. Indicates that X is scaled differently to Y. Indicates that there is a 2 by 2 transformation used to scale the component. Indicates that there are instructions for the composite character following the last component. If set this forces advance width and left side bearing for the composite to be equal to those from the original glyph. The bounding rectangle for the character. The bytes of the instructions for this glyph. An array of the last points of each contour. This creates an onCurve point that is between point1 and point2. The pair of horizontal metrics for an individual glyph. The advance width. The left side bearing. Create a new . Specifies the meaning of each coordinate in the simple glyph definition. The point is on the curve. The x-coordinate is 1 byte long instead of 2. The y-coordinate is 1 byte long instead of 2. The next byte specifies the number of times to repeat this set of flags. If is set this means the sign of the x-coordinate is positive. If is not set then the current x-coordinate is the same as the previous. If is set this means the sign of the y-coordinate is positive. If is not set then the current y-coordinate is the same as the previous. The meaning of the platform specific encoding identifier when the is . Roman. Japanese. Traditional Chinese. Korean. Arabic. Hebrew. Greek. Russian. RSymbol. Devanagari. Gurmukhi. Gujarati. Oriya. Bengali. Tamil. Telugu. Kannada. Malayalam. Sinhalese. Burmese. Khmer. Thai. Laotian. Georgian. Armenian. Simplified Chinese. Tibetan. Mongolian. Ge'ez. Slavic. Vietnamese. Sindhi. Uninterpreted. Uniquely defines the language in which the name character string is written for a name record in a name table. English. French. German. Italian. Dutch. Swedish. Spanish. Danish. Portuguese. Norwegian. Hebrew. Japanese. Arabic. Finnish. Greek. Icelandic. Maltese. Turkish. Croatian. Traditional Chinese. Urdu. Hindi. Thai. Korean. Lithuanian. Polish. Hungarian. Estonian. Latvian. Sami. Faroese. Farsi (Persian). Russian. Simplified Chinese. Flemish. Irish Gaelic. Albanian. Romanian. Czech. Slovak. Slovenian. Yiddish. Serbian. Macedonian. Bulgarian. Ukrainian. Byelorussian. Uzbek. Kazakh. Azerbaijani (Cyrillic). Azerbaijani (Arabic). Armenian. Georgian. Moldavian. Kirghiz. Tajiki. Turkmen. Mongolian. Mongolian (Cyrillic). Pashto. Kurdish. Kashmiri. Sindhi. Tibetan. Nepali. Sanskrit. Marathi. Bengali. Assamese. Gujarati. Punjabi. Oriya. Malayalam. Kannada. Tamil. Telugu. Sinhalese. Burmese. Khmer. Lao. Vietnamese. Indonesian. Tagalog. Malay (Roman). Malay (Arabic). Amharic. Tigrinya. Galla. Somali. Swahili. Kinyarwanda Ruanda. Rundi. NyanjaChewa. Malagasy. Esperanto. Welsh. Basque. Catalan. Latin. Quechua. Guarani. Aymara. Tatar. Uighur. Dzongkha. Javanese (Roman). Sundanese (Roman). Galician. Afrikaans. Breton. Inuktitut. Scottish Gaelic. Manx Gaelic. Irish Gaelic With Dot Above. Tongan. Greek Polytonic. Greenlandic. Azerbaijani (Roman). A record in a TrueType font which is a human-readable name for a feature, setting, copyright notice, font name or other font related information. The supported platform identifier. The platform specific encoding id. Interpretation depends on the value of the . The language id uniquely defines the language in which the string is written for this record. Used to reference this record by other tables in the font. The value of this record. Create a new . The platform identifier for a TrueType/OpenType font allows for platform specific implementations. Unicode Macintosh. The platform identifier 2 was originally to use with ISO 10646, but is now deprecated, as it and Unicode have identical character code assignments. Microsoft Windows. The meaning of the platform specific encoding when the is . Default semantics. Version 1.1 semantics. ISO 10646 1993 semantics (deprecated). Unicode 2.0 and above semantics for BMP characters only. Uncidoe 2.0 and above semantics including non-BMP characters. Unicode Variation Sequences. Full Unicode coverage. The meaning of the platform specific encoding when the is . Symbol. Unicode BMP. ShiftJIS. PRC. Big5. Wansung. Johab. Reserved. Reserved. Reserved. Unicode full repertoire. The set of tables in a TrueType font interpreted by the library. This table contains global information about the font. This table contains the data that defines the appearance of the glyphs in the font. This table contains information needed to layout fonts whose characters are written horizontally. This table contains metric information for the horizontal layout each of the glyphs in the font. This table stores the offsets to the locations of the glyphs (relative to the glyph table). This table establishes the memory requirements for the font. This table defines strings used by the font. This table contains information needed to use a TrueType font on a PostScript printer. It contains the PostScript names for all of the glyphs in the font Defines mapping of character codes to glyph index values in the font. Can contain multiple sub-tables to support multiple encoding schemes. Where a character code isn't found it should map to index 0. This table consists of a set of metrics that are required by Windows. Create a new . The builder with necessary tables set. Used to gather the necessary tables for a TrueType font. Defines mapping of character codes to glyph index values in the font. Can contain multiple sub-tables to support multiple encoding schemes. Where a character code isn't found it should map to index 0. Parses TrueType fonts. Parse the font from the input data. Produces a glyph table which contains a subset of the glyphs in the input font. Creates a new glyph table from the input font which contains only the glyphs required by the input mapping. The font used to create this subset. The raw bytes of the input font. The mapping of old glyph indices to new glyph indices. A new glyph table and associated information for use in creating a valid TrueType font file. Indices of any glyphs this glyph depends on, if it's a composite glyph. Marks a glyph index referenced by a composite glyph. The index of the glyph reference by this composite glyph. The offset of the index value in the data which this composite glyph was read from. A new encoding to create for the subsetted TrueType file. The characters to include in the subset in order where index is the character code. Create a new . Details of the new glyph 'glyf' table created when subsetting a TrueType font. The raw bytes of the new table. The offsets of each of the glyphs in the new table. The corresponding horizontal metrics for each glyph. The number of glyphs in the new table. Create a new . Convert the values to s. Generate a subset of a TrueType font file containing only the required glyphs. The tags for tables which are optional or required but can be skipped for PDF. This should also include hdmx, kern and OS/2 tables. Generate a subset of the input font containing only the data required for the glyphs specified in the encoding. Mapping from a glyph index in the old file to the new (subset) glyph index. Glyph index in the old input file. Glyph index in the new subset file. The character represented by this mapping. Create a new . The format 0 sub-table where character codes and glyph indices are restricted to a single bytes. A format 4 CMap sub-table which defines gappy ranges of character code to glyph index mappings. Create a new . A contiguous segment which maps character to glyph codes in a Format 4 CMap sub-table. The start character code in the range. The end character code in the range. The delta for the codes in the segment. Offset in bytes to glyph index array. Create a new . A format 2 sub-table for Chinese, Japanese and Korean characters. Contains mixed 8/16 bit encodings. First valid low byte for the sub header. Number of valid low bytes for the sub header. Adds to the value from the sub array to provide the glyph index. The number of bytes past the actual location of this value where the glyph index array element starts. In a TrueType font the CMap table maps from character codes to glyph indices A font which can run on multiple platforms will have multiple encoding tables. These are stored as multiple sub-tables. The represents a single subtotal. The platform identifier. Platform specific encoding indentifier. Interpretation depends on the value of the . Maps from a character code to the array index of the glyph in the font data. The character code. The index of the glyph information for this character. A format 6 CMap sub-table which uses 2 bytes to map a contiguous range of character codes to glyph indices. Create a new . The platform identifier for a CMap table. Unicode. Apple Macintosh. Unused. Microsoft Windows. . The cmap table maps character codes to glyph indices. The choice of encoding for a particular font is dependent on the conventions used by the intended platform. The cmap table can contain multiple encoding tables for use on different platforms, one for each supported encoding scheme. Version number (0). The sub-tables, one for each supported encoding scheme and platform. Create a new . Get the glyph index for the corresponding character code. The 'glyf' table contains the data that defines the appearance of the glyphs in the font. This includes specification of the points that describe the contours that make up a glyph outline and the instructions that grid-fit that glyph. Stores the composite glyph information we read when initially scanning the glyph table. Once we have all composite glyphs we can start building them from simple glyphs. Stores the position after reading the contour count and bounds. The 'head' table contains global information about the font. It contains things like as the font version number, the creation and modification dates, revision number and basic typographic data that applies to the font as a whole. Version number. Revision. Checksum adjustment is used to derive the checksum of the entire TrueType file. 0x5F0F3CF5. Flags. Units per em. Created date. Modified date. Minimum rectangle which contains all glyphs. MacStyle flags. Smallest readable size in pixels. Font direction hint. 0 for short offsets, 1 for long. 0 for current format. Create a new . Read the header table from the data stream. Values of the font direction hint. Strongly right to left with neutrals. Strongly right to left. Full mixed directional glyphs. Strongly left to right. Strongly left to right with neutrals. Values of the Mac Style flag in the header table. No flags set. Bold. Italic. Underline. Outline. Shadow. Condensed (narrow). Extended. The 'hhea' table contains information needed to layout fonts whose characters are written horizontally, that is, either left to right or right to left. This table contains information that is general to the font as a whole. Major version number of this table (1). Minor version number of this table (0). Distance from baseline to highest ascender. Distance from baseline to lower descender. The typographic line gap. The maximum advance width value as given by the Horizontal Metrics table. The minimum left side bearing as given by the Horizontal Metrics table. The minimum right sidebearing. The maximum X extent. Used to calculate the slope of the cursor. 1 is vertical. 0 is vertical. The amount by which a slanted highlight on a glyph should be shifted to provide the best appearance. 0 for non-slanted fonts. 0 for the current format. Number of horizontal metrics in the Horizontal Metrics table. Create a new . The 'hmtx' table contains metric information for the horizontal layout each of the glyphs in the font. The left-side bearing and advance widths for the glyphs in the font. For a monospace font this may only contain a single entry and the left-side bearings will be defined in . Some fonts may have an array of left side bearings following the . Generally, this array of left side bearings is used for a run of monospaced glyphs. For example, it might be used for a Kanji font or for Courier. The corresponding glyphs are assumed to have the same advance width as that found in the last entry in the . Create a new . Get the advance width for a glyph at the given index. Stores the offset to the glyph locations relative to the start of the . Index zero points to the "missing character" which is used for characters not provided by the font. The number of glpyhs in this table should match the maximum profile table. The glyph offsets contains an extra entry at the last index which points to the end of the glyph data, this makes it possible to compute the length of the last glyph entry and supports empty glyphs. Indicates the format the offsets were stored in in the underlying file, for the values are divided by 2. The values in are the real offsets, with any format changes removed. The glyph offsets relative to the start of the glyph data table. Create a new . Load the index to location (loca) table from the TrueType font. Requires the maximum profile (maxp) and header (head) table to have been parsed. The format of glyph offset entries stored in the raw TrueType data. The actual local offset divided by 2 is stored. The actual local offset is stored. A table in a TrueType font. The tag, a 4 letter/byte code, used to identify this table in a TrueType font. The directory entry from the font's offset subtable which indicates the length, offset, type and checksum of a table. The type of kerning covered by this table. The table is horizontal kerning data. The table has minimum values rather than kerning values. Kerning is perpendicular to the flow of text. If text is horizontal kerning will be in the up/down direction. The value in this sub table should replace the currently accumulated value. A kerning value for a pair of glyphs. The index of the left-hand glyph. The index of the right-hand glyph. The kerning value. For values greater than zero the characters are moved apart. For values less than zero the characters are moved closer together. Create a new . This table establishes the memory requirements for the font. The table version number. CFF fonts must use version 0.5 and only set number of glyphs. TrueType must use version 1. The number of glyphs in the font. Maximum number of points in a non-composite glyph. Maximum number of contours in a non-composite glyph. Maximum number of points in a composite glyph. Maximum number of contours in a composite glyph. 1 if instructions do not use the twilight zone (Z0). 2 if they do. Usually 2. Maximum number of points to use in Z0 (twilight zone). Maximum number of storage area locations. Maximum number of function definitions. Maximum number of instruction definitions. Maximum stack depth. Maximum byte count for glpyh instructions Maximum number of components at the top level for a composite glyph. Maximum level of recursion. 1 for simple components. Create a new . A name table allows multilingual strings to be associated with the TrueType font. Font name. Font family name. Font sub-family name. The name records contained in this name table. Creaye a new . Gets the PostScript name for the font if specified, preferring the Windows platform name if present. The PostScript name for the font if found or . Version 0 was defined in TrueType revision 1.5 and includes fields not in the Apple specification. Typographic ascender. Typographic descender. Typographic line gap. The Windows ascender metric. This should be used to specify the height above the baseline for a clipping region. The Windows descender metric. This should be used to specify the vertical extent below the baseline for a clipping region. Create a new . . The most basic format of the OS/2 table, excluding the fields not included in the Apple version of the specification. The version number 0 - 5 detailing the layout of the OS/2 table. The average width of all non-zero width characters in the font. Indicates the visual weight of characters in the font from 1 - 1000. The percentage difference from normal of the aspect ratio for this font. The font embedding licensing rights for this font. The recommended horizontal size for subscripts using this font. The recommended vertical size for subscripts using this font. The recommended horizontal offset (from the previous glyph origin to the subscript's origin) for subscripts using this font. The recommended vertical offset (from the previous glyph origin to the subscript's origin) for subscripts using this font. The recommended horizontal size for superscripts using this font. The recommended vertical size for superscripts using this font. The recommended horizontal offset (from the previous glyph origin to the superscript's origin) for superscripts using this font. The recommended vertical offset (from the previous glyph origin to the superscript's origin) for superscripts using this font. Thickness of the strikeout stroke. Position of the top of the strikeout stroke relative to the baseline. Positive values being above the baseline, negative values below. Value registered by IBM for each font family to find substitutes. The high byte is the family class, the low byte is the family subclass. The PANOSE definition of 10 bytes defines various information about the font enabling matching fonts based on requirements. The meaning of each byte in the PANOSE definition depends on the preceding bytes. The first byte is the family type, Latin, Latin Hand Written, etc. Specifies Unicode blocks supported by the font file for the Microsoft platform. The four-character identifier for the vendor of the given type face. Contains information concerning the nature of the font patterns. The minimum Unicode character code in this font. The maximum Unicode character code in this font. Create a new . Version 1 was defined in TrueType revision 1.66. Version 1 has two additional fields beyond those in version 0. This field is used to specify the code pages encompassed by the font file in the 'cmap' subtable for the Microsoft platform(3), Unicode BMP encoding (1). This field is the second byte used to specify the code pages encompassed by the font file in the 'cmap' subtable for the Microsoft platform(3), Unicode BMP encoding (1). Create a new . Version 4 was defined in OpenType 1.5. Version 4 has the same fields as in version 2 and version 3. Although new fields were not added beyond those in version 2 and 3, the specification of certain fields was revised. This metric specifies the distance between the baseline and the approximate height of non-ascending lowercase letters. This metric specifies the distance between the baseline and the approximate height of uppercase letters. This is the Unicode code point, in UTF-16 encoding, of a character that can be used for a default glyph if a requested character is not supported. If the value of this field is zero, glyph Id 0 is to be used for the default character. This is the Unicode code point, in UTF-16 encoding, of a character that can be used as a default break character. The break character is used to separate words and justify text. Most fonts specify U+0020 SPACE as the break character. The maximum distance in glyphs that any feature of this font is capable of effecting. For example kerning has a value of 2 (1 for each glyph in the kerning pair). Fonts with the 'f f i' ligature would have a value of 3. Create a new . Version 5 was defined in OpenType 1.7. Version 5 has two additional fields beyond those in versions 2 - 4. This value is the lower value of the size range for which this font has been designed. The units for this field are TWIPs (one-twentieth of a point, or 1440 per inch). This is the inclusive lower bound. This value is the upper value of the size range for which this font has been designed. The units for this field are TWIPs (one-twentieth of a point, or 1440 per inch). This is the exclusive upper bound. Create a new . This table contains information for TrueType fonts on PostScript printers. This includes data for the FontInfo dictionary and the PostScript glyph names. Format 1 contains the 258 standard Mac TrueType font file.
Format 2 is the Microsoft font format.
Format 2.5 is a space optimised subset of the standard Mac glyph set.
Format 3 enables a special font type which provides no PostScript information.
Angle in counter-clockwise degrees from vertical. 0 for upright text, negative for right-leaning text. Suggested values for the underline position with negative values below the baseline. Suggested values for the underline thickness. 0 if the font is proportionally spaced, non-zero for monospace or other non-proportional spacing. Minimum memory usage when the TrueType font is downloaded. Maximum memory usage when the TrueType font is downloaded. Minimum memory usage when the TrueType font is downloaded as a Type 1 font. Maximum memory usage when the TrueType font is downloaded as a Type 1 font. PostScript names of the glyphs. Create a new . Calculates checksums for TrueType fonts. Calculate the checksum for the whole font by setting checksum adjustment in the head table to 0. Calculate the checksum for the specific table. Calculate the TrueType checksum for the provided bytes. Wraps the to support reading TrueType data types. Create a new . Create a new . The current position in the data. The length of the data in bytes. Read a 32-fixed floating point value. Read a . Read a . Read a . Reads the 4 character tag from the TrueType file. Read a of the given number of bytes in length with the specified encoding. Read a . Read an . Read a . Read a from the data in UTC time. In TrueType dates are specified as the number of seconds since 1904-01-01. Move to the specified position in the data. Read an which represents a signed byte. Read an array of s with the specified number of values. Read an array of s with the specified number of values. Read an array of s with the specified number of values. Read an array of s with the specified number of values. A TrueType font. The font version number. The table directory, entries indicate the offset and length of the data for a given table name. The actual table data parsed for this TrueType font. The name of the font according to the font's name table. The cmap subtable for Windows Unicode (3, 1). Can be . The cmap subtable for Mac Roman (1, 0). Can be . The cmap subtable for Windows Symbol (3, 0). Can be . The number of tables in this font. Create a new . Try to get the bounding box for a glyph representing the specified character code if present. Try to get the bounding box for a glyph representing the specified character code if present. Uses a custom mapping of character code to glyph index. Try to get the bounding box for a glyph representing the specified character code if present. Try to get the path for a glyph representing the specified character code if present. Uses a custom mapping of character code to glyph index. Try to get the advance width for a glyph representing the specified character code if present. Try to get the advance width for a glyph representing the specified character code if present. Get the number of units per em for this font. A table directory entry from the TrueType font file. Indicates the position of the corresponding table data in the TrueType font. Character to glyph mapping. Required Glyph data. Required Font header. Required Horizontal header. Required Horizontal metrics. Required Index to location. Required Maximum profile. Required Naming table. Required PostScript information. Required OS/2 and Windows specific metrics. Required Control Value Table. Optional Embedded bitmap data. Optional Embedded bitmap location data. Optional Embedded bitmap scaling data. Optional Font program. Optional Grid-fitting and scan conversion procedure (grayscale). Optional Horizontal device metrics. Optional Kerning. Optional Linear threshold title. Optional CVT program. Optional PCL5. Optional Vertical device metrics. Optional Vertical metrics header. Optional Vertical metrics. Optional Compact font format table. The corresponding table contains a Compact Font Format font representation (also known as a PostScript Type 1, or CIDFont). Optional The 4 byte tag identifying the table. The checksum for the table. Offset of the table data from the beginning of the file in bytes. The length of the table data in bytes. Create a new . Gets an empty header table with the non-tag values set to zero. The number of standard mac glyph names. The 258 standard mac glyph names used in 'post' format 1 and 2. The indices of the standard mac glyph names. Call other subroutine command. Arguments are pushed onto the PostScript interpreter operand stack then the PostScript language procedure at the other subroutine index in the OtherSubrs array in the Private dictionary (or a built-in function equivalent to this procedure) is executed. Calls a subroutine with index from the subroutines array in the Private dictionary. This operator returns the result of dividing num1 by num2. The result is always a real. Pops a number from the top of the PostScript interpreter operand stack and pushes that number onto the operand stack. This command is used only to retrieve a result from an OtherSubrs procedure. Returns from a charstring subroutine and continues execution in the calling charstring. Sets the current point to (x, y) in absolute character space coordinates without performing a charstring moveto command. This establishes the current point for a subsequent relative path building command. The 'setcurrentpoint' command is used only in conjunction with results from 'OtherSubrs' procedures. Brackets an outline section for the dots in letters such as "i", "j" and "!". Declares the vertical ranges of three horizontal stem zones: 1st: between y0 and y0 + dy0 2nd: between y1 and y1 + dy1 3rd: between y2 and y2 + dy2 Where y0, y1 and y2 are all relative to the y coordinate of the left sidebearing point. Suited to letters with 3 horizontal stems like 'E'. Declares the vertical range of a horizontal stem zone between the y coordinates y and y+dy, where y is relative to the y coordinate of the left sidebearing point. Declares the horizontal ranges of three vertical stem zones. 1st: between x0 and x0 + dx0 2nd: between x1 and x1 + dx1 3rd: between x2 and x2 + dx2 Where x0, x1 and x2 are all relative to the x coordinate of the left sidebearing point. Suited to letters with 3 vertical stems, for instance 'm'. Declares the horizontal range of a vertical stem zone between the x coordinates x and x+dx, where x is relative to the x coordinate of the left sidebearing point. Represents the deferred execution of a Type 1 Build Char command. Closes a sub-path. This command does not reposition the current point. Horizontal line-to command. Relative move to for horizontal dimension only. Horizontal vertical curve to command. Draws a Bézier curve when the first Bézier tangent is horizontal and the second Bézier tangent is vertical. Equivalent to dx1 0 dx2 dy2 0 dy3 rrcurveto. Relative rcurveto. Whereas the arguments to the rcurveto operator in the PostScript language are all relative to the current point, the arguments to rrcurveto are relative to each other. Equivalent to: dx1 dy1 (dx1+dx2) (dy1+dy2) (dx1+dx2+dx3) (dy1+dy2+dy3) rcurveto. Relative line-to command. Creates a line moving a distance relative to the current point. Relative move to command. starts a new subpath of the current path in the same manner as moveto. However, the number pair is interpreted as a displacement relative to the current point (x, y) rather than as an absolute coordinate. moveto: moveto sets the current point in the graphics state to the user space coordinate (x, y) without adding any line segments to the current path. If the previous path operation in the current path was also a moveto or rmoveto, that point is deleted from the current path and the new moveto point replaces it. Vertical-horizontal curveto. Equivalent to 0 dy1 dx2 dy2 dx3 0 rrcurveto. This command eliminates two arguments from an rrcurveto call when the first Bézier tangent is vertical and the second Bézier tangent is horizontal. Vertical-line to command. Vertical move to. Moves relative to the current point. Finishes a charstring outline definition and must be the last command in a character's outline (except for accented characters defined using seac). The name hsbw stands for horizontal sidebearing and width; horizontal indicates that the y component of both the sidebearing and width is 0. This command sets the left sidebearing point at (sbx, 0) and sets the character width vector to(wx, 0) in character space. This command also sets the current point to (sbx, 0), but does not place the point in the character path. Sets left sidebearing and the character width vector. This command also sets the current point to(sbx, sby), but does not place the point in the character path. Standard encoding accented character. Makes an accented character from two other characters in the font program. Decodes a set of CharStrings to their corresponding Type 1 BuildChar operations. A charstring is an encrypted sequence of unsigned 8-bit bytes that encode integers and commands. Type 1 BuildChar, when interpreting a charstring, will first decrypt it and then will decode its bytes one at a time in sequence. The value in a byte indicates a command, a number, or subsequent bytes that are to be interpreted in a special way. Once the bytes are decoded into numbers and commands, the execution of these numbers and commands proceeds in a manner similar to the operation of the PostScript language. Type 1 BuildChar uses its own operand stack, called the Type 1 BuildChar operand stack, that is distinct from the PostScript interpreter operand stack. This stack holds up to 24 numeric entries. A number, decoded from a charstring, is pushed onto the Type 1 BuildChar operand stack. A command expects its arguments in order on this operand stack with all arguments generally taken from the bottom of the stack (first argument bottom-most); however, some commands, particularly the subroutine commands, normally work from the top of the stack. If a command returns results, they are pushed onto the Type 1 BuildChar operand stack (last result topmost). The ordered list of numbers and commands for a Type 1 charstring or subroutine. Represents the MinFeature entry which is required for compatibility and is required by the specification to have the value 16, 16. The first value. The second value. The required default value of . Creates a array. The first value. The second value. To distinguish between binary and hex the first 4 bytes (of the ciphertext) for hex must obey these restrictions: The first byte must not be whitespace. One of the first four ciphertext bytes must not be an ASCII hex character. Parse Adobe Type 1 font format. Parses an embedded Adobe Type 1 font file. The bytes of the font program. The length in bytes of the clear text portion of the font program. The length in bytes of the encrypted portion of the font program. The parsed type 1 font. Where an entire PFB file has been embedded in the PDF we read the header first. This is shown briefly in the Type 1 spec but nowhere is it specified what it means or does. An array must begin with either '[' or '{'. An array must end with either ']' or '}'. An Adobe Type 1 font. The name of the font. The encoding dictionary defining a name for each character code. The font matrix. A rectangle in glyph coordinates specifying the font bounding box. This is the smallest rectangle enclosing the shape that would result if all of the glyphs were overlayed on each other. The private dictionary for this font. The charstrings in this font. Create a new . Get the bounding box for the character with the given name. Whether the font contains a character with the given name. Get the pdfpath for the character with the given name. The Private dictionary for a Type 1 font contains hints that apply across all characters in the font. These hints help preserve properties of character outline shapes when rendered at smaller sizes and lower resolutions. These hints help ensure that the shape is as close as possible to the original design even where the character must be represented in few pixels. Note that subroutines are also defined in the private dictionary however for the purposes of this API they are stored on the parent . Optional: Uniquely identifies this font. Optional: Indicates the number of random bytes used for charstring encryption/decryption. Default: 4 Optional: Preserved for backwards compatibility. Must be set if the is 1. Required: Backwards compatibility. Default: 5839 Required: Backwards compatibility. Default: {16 16} Creates a new . The builder used to gather property values. A mutable builder which can set any property of the private dictionary and performs no validation. Temporary storage for the Rd procedure tokens. Temporary storage for the No Access Put procedure tokens. Temporary storage for the No Access Def procedure tokens. Temporary storage for the decrypted but raw bytes of the subroutines in this private dictionary. Temporary storage for the tokens of the other subroutine procedures. . . . . . Generate a from the values in this builder. The generated .