
The Attachment Point List table (AttachmentList) identifies all the attachment points defined in the GPOS table and their associated glyphs so a client can quickly access coordinates for each glyph’s attachment points. If the font does not include a GlyphClassDef table, the client must define and maintain this information when using the GSUB and GPOS tables. For example, a LookupFlag may specify ignoring ligatures and marks during a glyph operation. In addition, a client uses class definitions to apply GSUB and GPOS LookupFlag data correctly. A base glyph, ligature glyph, mark glyph, and glyph components For example, GPOS uses the glyph classes to distinguish between a simple base glyph and the mark glyph that follows it. GSUB and GPOS lookups define and use these glyph classes to differentiate the types of glyphs in a string. The Glyph Class Definition (GlyphClassDef) table identifies four types of glyphs in a font: base glyphs, ligature glyphs, combining mark glyphs, and glyph components (see Figure 7b). High-level organization of GDEF table Glyph Class Definition Table The rest of this chapter describes the individual GDEF tables and the tables that they reference. This overview explains how each of the three tables are organized and used (See Figure 7a). OverviewĪ client may use any one or more of the three GDEF tables during text processing. Without a GDEF table, however, the text-processing client may have to define and maintain the GDEF information on its own when substituting and positioning glyphs. Even so, a GDEF table is optional for a font, included at the discretion of the font developer. The MarkAttachClassDef table classifies mark glyphs, to help group together marks that are positioned similarly.īoth the GSUB and GPOS tables reference the GDEF table information to supplement their own data for substituting and positioning glyphs.

The LigatureCaretList table contains positioning data for ligature carets, which the text-processing client uses on screen to select and highlight the individual components of a ligature glyph.The AttachmentList table identifies all attachment points on the glyphs, which streamlines data access and bitmap caching.The GlyphClassDef table classifies the different types of glyphs in the font.The below example instructs user agents to place the "A" and "V" characters closer together than the standard distance between characters.The Glyph Definition (GDEF) table contains three types of information in three independent tables: Each carries references to at least two characters (attributes u1 and u2) and an attribute k that determines how much the distance between those characters should be decreased. Two more elements can be defined inside font: and. Again, you can use arbitrary SVG to define the glyph, which allows for great effects in supporting user agents. If you also specify the lang attribute on a glyph, you can further restrict it to certain languages (represented by xml:lang on the target) exclusively.
GLYPHS DEFINITION CODE
It defines the unicode code point represented by this glyph. The actual glyphs are then defined by elements. For simple glyphs, however, you can add a d attribute - this defines a shape for the glyph exactly like how standard SVG paths work. You can use literally any other SVG elements in here, even, or. It also shows how glyphs are created: By adding any graphical SVG content inside. This defines what should be displayed if a certain glyph is not found in the font and if there are no fallback mechanisms. The above example states that if the renderer has a local font available named "Super Sans Bold", it should use this instead.įollowing is a element. You can point to external sources for font declarations by means of its children and. Its child, the element, corresponds to CSS' src descriptor in declarations. All following attributes are rendering instructions for the font layout engine for example, how much of the glyphs' overall heights are ascenders. The font-weight and font-style attributes have the same purpose as the equivalent descriptors in CSS.

In the example above, the first and most important to be defined is font-family, the value of which can then be referenced in CSS and SVG font-family properties. It defines basic properties of the final font such as weight, style, etc. The element is the SVG equivalent of the CSS declaration.

There are several accompanying attributes that help further define the basic glyph-box layout. The value 1000 sets a reasonable value to work with. The horiz-adv-x attribute determines how wide a character is on average compared to the path definitions of the single glyphs. This bears an id attribute, to enable it to be referenced via a URI (see below). glyph-orientation-horizontal Deprecated.
