tiro_hudson
Beta: FontLab Studio Win
Jr. Member
 
Karma: +8/-0
 Canada
Posts: 72
|
 |
« Reply #1 on: 2009-05-08, 16:49:19 » |
|
Note that, if you use OpenType for this, you are not adding characters: you are adding glyphs. The text string in the background would remain without parentheses.
It is not possible to perform many-to-many substitutions in OpenType, but you can handle this kind of thing by using a one-to-many substitution with context. You will need two separate lookups: one for the opening parenethesis and one for the closing one. Here is how the lookups would work expressed in VOLT syntax; I'm sure someone else can explain how the corresponding FDK/FontLab syntax would look, or perhaps you can figure it out:
<numeral> -> parenleft <numeral> | {slash, fraction}
for the opening parenthesis, and then
<numeral> -> <numeral> parenright {slash, fraction} |
That is the most simple lookup context to deal with a pair of numerals separated by a slash or fraction slash glyph. You could also employ longer context strings to put parentheses around longer groups of numerals.
|