Base Indexed Font Specification Dictionaries

This clause provides the specifications for the two kinds of Indexed Font Specification Dictionaries: FontType 3 Indexed Font Specification Dictionaries and FontType 1 Indexed Font Specification Dictionaries. This clause also specifies how GlyphStrings are mapped into glyph identifiers using the Encoding Vector that represents a GLYPH INDEX MAP in an Indexed Font. The Standard GLYPH INDEX MAPs, available on all SPDL presentation systems, are described.

FontType 3 Indexed Font Specification Dictionaries

In addition to the <FontType: Integer> pair, A FontType 3 Indexed Font Specification Dictionary shall have the following key/value pairs, the required key/value pairs:

FontMatrix

The mandatory key/value pair <FontMatrix: Transformation> specifies the initial or default value of the Transformation used when the Indexed Font Specification Dictionary is made into a corresponding IndexedFont.

FontBBox

The mandatory key/value pair <FontBBox: VectorReference> references a Vector of four numbers. This represents the value of ISO9541/MAXFONTEXT, in the order (maxfontext-minx, maxfontext-miny, maxfontext-maxx, maxfontext-maxy).

Encoding

The mandatory key/value pair <Encoding: VectorReference> references a Vector of Identifiers that represents a GLYPH INDEX MAP. This value is used to perform Glyph Mapping during character text imaging (see ).

Metrics

The mandatory key/value pair <Metrics: DictionaryReference> is a DictionaryReference which references a Dictionary containing per-glyph information regarding glyph extents, and glyph escapements for the default writing mode of this font, as follows:

ConstructGlyph

The mandatory key/value pair <ConstructGlyph: Procedure> references a Procedure responsible for constructing the glyph representation. Its semantics are constrained by its use in ShowGlyph (see ).

  • The recommended definition of the ConstructGlyph Procedure, in the context of ShowGlyph (see ), and assuming the presence of a GlyphProcs Dictionary as described in this subclause is:
  • {/GlyphProcs GetValue Exchange Get Execute}
  • This Procedure would utilize another key/value pair in the Indexed Font Specification Dictionary, <GlyphProcs: DictionaryReference>. The value of GlyphProcs would reference a Dictionary containing per-glyph glyph representation procedures, as follows:

    FontType 3

    A FontType 3 Indexed Font Specification Dictionary may contain one or more of the following key/value pairs, the optional key/value pairs, with semantics defined by this International Standard:

    WMode

    The optional key/value pair <WMode: Cardinal> specifies the writing mode to be used with the glyph representations in this font, if other than the default. If WMode is not present in the font, the value defaults to zero. A value of zero shall indicate the default writing mode. A value of N, greater than zero, shall indicate the Nth alternate writing mode, specified by the (N - 1)th element in the OtherMetrics Vector (see below). If the value of WMode specifies a writing mode not supported by this font, or is greater than the implementation limit for the maximum value of WMode, then the content interpreter shall use the default writing mode for text presentation with this font.

    OtherMetrics

    The optional key/value pair <OtherMetrics: VectorReference> references a Vector of DictionaryReferences. Each DictionaryReference shall reference a Dictionary containing per-glyph information regarding positioning points and escapements for an alternate writing mode of this font, as follows:

    • The keys in the referenced Dictionary are glyph identifiers. For every key/value pair in this Dictionary, there should be an key/value pair with the same key in the Metrics Dictionary.
    • The value of each key/value pair is a reference to a Vector of four numbers in the following order: (wx, wy, px, py).
      • The value of <wx: Number> is the difference ISO9541/EX - ISO9541/PX
      • The value of <wy: Number> is the difference ISO9541/EY - ISO9541/PY
      • The values of px and py are the coordinates, in x and y, of the positioning point (ISO9541/PX, ISO9541/PY) for this glyph in this writing mode.

    In addition to the required key/value pairs, and the optional key/value pairs to support alternate writing modes, a Indexed Font Specification Dictionary shall contain any other key/value pairs needed to support the ConstructGlyph key/value pair, and may contain any other key/value pairs as desired.

    Finally, all Base Indexed Font Specification Dictionaries shall provide a glyph representation whose glyph identifier is <.notdef: Name>. This glyph representation shall be imaged whenever a glyph identifier is specified for imaging that is undefined in this font; i.e., whose shape description information is not provided by this font. The glyph representation associated with this special glyph identifier is at the discretion of the font designer.

    FontType 1 Indexed Font Specification Dictionaries

    The semantics of FontType 1 Font Dictionaries are defined by reference to FontType 3 Font Dictionary semantics. A FontType 1 Indexed Font Specification Dictionary shall contain all the required key/value pairs specified in normative . Their semantics are as follows:

    Key/Value pairs with same semantics as in FontType 3

    <FontMatrix: Transformation>, <FontBBox: VectorReference>, <Encoding: VectorReference>: same semantics as for FontType 3 Indexed Font Specification Dictionaries.

    PaintType

    The mandatory key/value pair <PaintType: Cardinal> specifies a value that shall be 2 or 0. The semantics of these values is given in . ValuePaintType 0indicates the glyph representations will be filled (solid) outlines 2indicates the glyph representations will be stroked (hollow) outlines

    CharStrings

    The mandatory key/value pair <CharStrings: DictionaryReference> references a Dictionary containing per-glyph glyph representation procedures, as follows:

    • The keys in the referenced Dictionary are glyph identifiers.
    • The value of each key/value pair is a reference to an OctetString which is interpreted as an encrypted glyph procedure in the format defined in ISO/IEC 9541-3.

    FontType 3 keys that are not present in FontType 1

    The following key/value pairs which are present in a FontType 3 Indexed Font Specification Dictionary are not present in a FontType 1 Indexed Font Specification Dictionary. Their semantics are replaced as follows:

    • <Metrics: DictionaryReference>: The per-glyph information regarding extents and escapement are included in the glyph procedures in the CharStrings Dictionary; therefore, looking up the glyph metrics in a Metrics Dictionary during glyph imaging is unnecessary. The escapement and positioning information included in the glyph procedures can be overridden by an optional Metrics Dictionary (see below), but the key/value pairs in such a Dictionary have different semantics than the key/value pairs in a Metrics Dictionary in a FontType 3 Indexed Font Specification Dictionary.
    • <ConstructGlyph: Procedure>: The glyph construction procedure is implicit for a FontType 1 Indexed Font Specification Dictionary, and always has the following semantics (refer to ):
      • use the glyph identifier to load the corresponding glyph procedure from the CharStrings Dictionary in this font;
      • interpret the glyph procedure according to the semantics defined in ISO/IEC 9541-3.

    FontType 1 Indexed Font Specification Dictionary

    A FontType 1 Indexed Font Specification Dictionary may contain one or more of the following key/value pairs, the optional key/value pairs, with semantics defined by this International Standard:

    Metrics

    The optional key/value pair <Metrics: DictionaryReference> references a Dictionary containing per-glyph information. This information can override some of the information included in the glyph procedures, as follows:

    • The keys in the referenced Dictionary are glyph identifiers, identical to some or all of the glyph identifiers in the Dictionary referenced by CharStrings in the Indexed Font Specification Dictionary.
    • The value of each key/value pair may be either
      • a single number, wx;
      • a reference to a Vector of two numbers, (sbx,wx);
      • a reference to a Vector of four numbers, (sbx, sby, wx, wy).
    • Each glyph procedure in the CharStrings Dictionary of a FontType 1 Indexed Font Specification Dictionary starts with an hsbe or sbe glyph procedure operator (see ISO/IEC 9541-3.2 for a description of the semantics of these glyph procedure operators). The numbers sbx, sby, wx, wy, override the invocation of the hsbe or sbe operators as follows:
      • The value of <wx: Number> is a new escapement (x component) for the default writing mode of the glyph; this is the difference ISO9541/EX - ISO9541/PX.
      • The value of <wy: Number> is a new escapement (y component) for the default writing mode of the glyph; this is the difference ISO9541/EY - ISO9541/PY. If wx is specified, but wy is unspecified, then wy shall be assigned a value of zero.
      • The value of <sbx: Number> is a new initial reference point (x component) for the glyph procedure graphic operators. Providing a different value for this component causes the glyph to be displaced horizontally, in all writing modes, by the amount (override value - glyph procedure value). If unspecified, then sbx shall be unchanged.
      • The value of <sby: Number> is a new initial reference point (y component) for the glyph procedure graphic operators. Providing, a different value for this component causes the glyph to be displaced vertically, in all writing modes, by the amount (override value - glyph procedure value). If neither sbx nor sby is specified, then sby shall be unchanged. If sbx is specified, but sby is unspecified, then sby shall be assigned a value of zero.
      In fonts which have a default left-to-right writing mode, the value of sbx should be the left sidebearing of the glyph (this is the difference ISO9541/EXT/MINX - ISO9541/PX) and the value of sby should be zero. See ISO/IEC 9541-3.2, clause 2.8.4.1).

    Metrics2

    The optional key/value pair < Metrics2: DictionaryReference> references a Dictionary containing per-glyph information which, for the first alternate writing mode of this font, can override the default glyph positioning points and glyph escapements included in the glyph procedures. The Dictionary referenced shall be of the same form as those referenced by the OtherMetrics key/value pair in a FontType 3 Indexed Font Specification Dictionary. If an OtherMetrics Vector is also present in this font, the Metrics2 key/value pair shall take precedence over the zero'th element in the OtherMetrics Vector. If a Metrics key/value pair is also present in this font, the information in the Metrics2 Dictionary shall be interpreted with reference to the modified glyph information derived from application of the information in the Metrics Dictionary.

    OtherMetrics

    The optional key/value pair <OtherMetrics: VectorReference> shall be as for FontType 3 Indexed Font Specification Dictionaries. Information in OtherMetrics shall take precedence over corresponding information included in the glyph procedures. In a FontType 1 Indexed Font Specification Dictionary, if an OtherMetrics key/value pair is present, then a Metrics2 key/value pair shall be present. If a Metrics key/value pair is also present in this font, the information in the OtherMetrics Dictionaries shall be interpreted with reference to the modified glyph information derived from application of the information in the Metrics Dictionary.

    CDevProc

    The optional key/value pair <CDevProc: Procedure> shall be a reference to a Procedure which is capable of algorithmically modifying per-glyph properties of escapement and positioning point for writing modes 0 and 1. If Metrics and/or Metrics2 Dictionaries are also present in this font, the application of CDevProc occurs after the application of information in these Dictionaries. If an OtherMetrics key/value pair is present in this font, then CDevProc shall not be present. The semantics of CDevProc are as follows:

    • Numeric metric information for the first two writing modes (0 and 1) are placed on the operand stack in the order wx0, wy0, minx, miny, maxx, maxy, wx1, wy1, px1, py1:
      • wx0, wy0, wx1, wy1, are the escapements (ISO9541/EX - ISO9541/PX, etc.) for writing modes 0 and 1, respectively.
      • minx, miny, maxx, maxy, respectively, are the values of the components of ISO9541/EXT, the extents of the glyph.
      • px1, py1, are the x and y components of the positioning point (ISO9541/PX, ISO9541/PY) for writing mode 1. (The positioning point for the default writing mode is (0,0), and cannot be changed by use of CDevProc.)
    • The glyph identifier of the glyph being imaged is then placed on the operand stack.
    • The CDevProc Procedure is interpreted. It shall remove the eleven arguments from the stack, and leave as a result ten numbers with semantics similar to the first ten arguments.
    • These ten numbers are then used as new values for the corresponding metric properties for the glyph.

    WMode

    The optional key/value pair <WMode: Cardinal> shall be as for FontType 3 Indexed Font Specification Dictionaries.

    FontType 1 Indexed Font Specification Dictionaries

    As with FontType 3 Indexed Font Specification Dictionaries, FontType 1 Indexed Font Specification Dictionaries shall contain any other key/value pairs needed to support the imaging of glyph representations, and shall provide a glyph representation whose identifier is <.notdef: Name>. The Indexed Font Specification Dictionary may contain any other entries desired.

    Base Font Glyph Mapping

    If the current font is a Base Font, this subclause defines the algorithm for performing Glyph Mapping during character text imaging.

    Glyph indices are derived from GlyphStrings as follows:

    • Each octet in the GlyphString is interpreted as an Cardinal between 0 and 255, inclusive.
    • Each resulting Cardinal is utilized as a glyph index.

    No use is made of font indices, and none are derived from the GlyphString.

    The association between glyph indices and glyph identifiers in a Base Font is specified by the Encoding Vector. The Encoding is a reference to a Vector of Identifiers, and is a required key/value pair in all Base Indexed Font Specification Dictionaries. This Vector, the Glyph Index Encoding Vector, represents a GLYPH INDEX MAP in content. Each Identifier in the Glyph Index Encoding Vector shall be a glyph identifier in the form specified in . Each glyph index is used as an index into the Glyph Index Encoding Vector, thereby selecting a glyph identifier. As each glyph specifier is determined, it is returned for further processing to the imaging operator in that required Glyph Mapping. Glyph Index Encoding Vectors can represent more Glyph Mappings than can be specified by a GLYPH INDEX MAP. The GLYPH INDEX MAP is constrained to have Glyph Identifiers which are either Local Names or Structure Names. On the other hand, any Identifier can be used as a glyph identifier in Glyph Index Encoding Vectors constructed in content.

    If a glyph index is greater than the size (less one) of the GLYPH INDEX MAP, then the content interpreter shall raise a RangeCheck exception, when it attempts to associate the glyph index with a glyph identifier.

    Each glyph identifier in the Glyph Index Encoding Vector should be the identifier of a glyph representation in the font. If a glyph identifier is selected from the Glyph Index Encoding Vector, and there is no such glyph representation in the font, then the glyph identifier <.notdef: Name> shall be substituted. A glyph identifier used in a Indexed Font Specification Dictionary and/or in a Glyph Index Encoding Vector can be any Identifier. Thus, glyph identifiers used in the Glyph Index Encoding Vector in a given Indexed Font Specification Dictionary should be appropriate to the repertoire of glyph identifiers in the font resource within that Indexed Font Specification Dictionary. In particular, the Identifiers used in the Glyph Index Encoding Vector should be the same as the Identifiers used to identify the glyph representations in the Indexed Font Specification Dictionary.

    Standard GLYPH INDEX MAPs

    This International Standard defines standard GLYPH INDEX MAPs, some of which shall be available on all SPDL presentation systems, as indicated in the following subclauses. Other GLYPH INDEX MAPs may be available on specific presentation systems, or used in specific IndexedFont and Indexed Font Specification Dictionaries. Such systems or IndexedFonts need not use the standard GLYPH INDEX MAPs to be conforming.

    The standard GLYPH INDEX MAPs may be declared in RESOURCE DECLARATIONS (see ) and then used in document content within the scope of the DECLARATION.

    Latin1 Publishing GLYPH INDEX MAP

    A GLYPH INDEX MAP named GlyphIndexMap::Latin1Publishing shall be available on all SPDL presentation systems. It is a Vector of 256 Names. Each Name is of the form afiinnnn as specified in or is the special name .notdef.

    The specific list of Names in GlyphIndexMap::Latin1Publishing is defined in .

    Latin1 Publishing (A) GLYPH INDEX MAP

    A GLYPH INDEX MAP named GlyphIndexMap::Latin1PublishingA is defined by this International Standard. It is a Vector of 256 Names.

    The specific list of Names in GlyphIndexMap::Latin1PublishingA is defined in .

    Algorithmic AFII GLYPH INDEX MAPs

    A family of GLYPH INDEX MAPs named GlyphIndexMap::IR::ddd shall be available on all SPDL presentation systems. Each d is an ISO 646 decimal digit. ddd shall be the decimal representation of a number between 0 and 4,294,967,040 decimal and ddd shall be evenly divisible by 256..

    Each member of this family GLYPH INDEX MAPs shall be a Vector of 256 Names. Each Name is of the form afiinnn as specified in . For each specific instance of the family, GlyphIndexMap::IR::ddd, each Name, afiinnn, in the GLYPH INDEX MAP shall be such that the decimal value of nnn is the decimal value of ddd plus the index (0 through 255 decimal, inclusive) of the position of that Name within the Vector.