The ssty feature returns a list of alternate glyphs to be used in superscript or subscript circumstances: the first glyph in the set should be for first-level sub/superscripts, and the second glyph for second-level sub/superscripts. Sub B from Īgain, this is the sort of thing your font editor might do for you automatically (this is why we use computers, after all).Īnother use of this substitution comes in mathematics handling. The idea behind this feature is that a user selects a glyph, and the design software asks the shaping engine to return the set of all possible glyphs that the user might want to use instead of that glyph - all the different swash, titling, small capitals or other variants: One such feature is aalt, “access all alternates”, which is used by the “glyph palette” window in various pieces of design software. This substitution is designed for features where the shaping engine is expected to pass a set of glyphs to the user interface, so that the user can choose which one they want. On the face of it, this doesn’t make much sense - how can the engine choose which “one out of the set” it should substitute? Well, the answer is: it doesn’t. Alternate substitutionĪfter one-to-many, we have what OpenType calls “one from many” that is, one glyph can be substituted by one out of a set of glyphs. With this rule applied, we now no longer need to deal with zain as a special case - any future rule which applies to reh will deal correctly with the zain situation as well, so you have fewer “letters” to think about. For example, we can provide the glyph ز (zain) by having an empty zain-ar glyph mapped to codepoint U+0632, but in our ccmp feature do this: To do this, you would add empty glyphs to the font so that the Unicode codepoints can be mapped properly, but have the outline provided by other glyphs substituted in the ccmp (glyph composition and decomposition feature). This allows you to reposition the dots independently of the base characters, and it can reduce the number of glyphs that you need to design and write rules for, as you only need to draw and engineer the “skeleton” form for each character. In fact, when engineering Arabic fonts, it can be extremely useful to separate the dots ( nukta) from the base glyphs ( rasm). This tells the shaper to split up final alif madda into two glyphs you have the final form of alif, and so long as your madda mark is correctly positioned, you are essentially synthesizing a new glyph out of the two others. The possible syntaxes for a single substitution are: Arabic joining is another example: the shaper will automatically turn on the fina feature for the final glyph in a conjoined form, but we need to tell it which substitution to make. A good example of this is small capitals: when your small capitals feature is turned on, you substitute “A” by “A.sc”, “B” by “B.sc” and so on. ![]() The simplest type of substitution feature available in the GSUB table is a single, one-to-one substitution: when the feature is turned on, one glyph becomes another glyph. In the next chapter, we’ll look at things the other way around - given something we want to do with a script, how can we get OpenType to do it? But to get to that stage, we need to be familiar with the possibilities that we have at our disposal. ![]() In this chapter, we’ll examine each of these types of rule, by taking examples of how they can be used to layout global scripts. There are several different types of rule, which instruct the shaper to perform the substitution or positioning in subtly different ways. We do this by writing collections of rules (called lookups). Using hb-shape to check positioning rulesĪs we have seen, OpenType Layout involves first substituting glyphs to rewrite the input stream, and then positioning glyphs to put them in the right place.Contextual and chaining contextual positioning.Reverse chained contextual substitution.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |