To position glyphs correctly, it is often necessary to make use of the glyph’s metrics from within the font. Glyph metrics are numeric values for standard measurements defined for each glyph within the TrueType font. The following metrics can be used in a GDL program:
Useful abbreviations (as defined in stddef.gdh) are shown in parenthesis. Note that ascent and descent are not metrics of an individual glyph but of the font as a whole.
Use shifting and/or kerning to position diacritics over lowercase vowels. The diacritics should be attached to the previous base character. Here are some diacritics to include:
What is required to position them correctly over base characters of widely different widths and heights (eg, m vs. l)?
What is necessary to handle diacritics that have overstriking built in to their glyph metrics?
What is necessary to render i and j correctly with diacritics? (Hint: other glyphs you may find useful include: dotless i [glyphid 194] and dotless j [glyphid 195]).
Hint: instead of including numbers directly in the rules, define glyph attributes indicating the amounts by which to shift. You may also need to define a glyph attribute on the base characters as well as the diacritics being positioned. To access glyph attributes for a slot in the rule other than the one being shifted, use the following syntax:
If you do not have a keyboard installed that allows you to conveniently type diacritics or other non-ASCII characters, you can enter them into your Graide test data using Unicode codepoints. The syntax is
For instance, to enter X + diaeresis, type the following as test data: X\u0308. (Do not leave any space after the X.)
If you prefer to always see the Unicode codepoints for non-ASCII data, there is a flag in the Configuration properties dialog to indicate this. Open the section called User Interface and check the box labeled Display character entities.
Entering non-ASCII text data
Run the following data: m\u0304 I\u0304. Use the Glyph tab to compare the values of the glyph attributes for m and I. Use the Slot tab to compare the amounts by which the diacritic was shifted.