What is tag in ApplySubstitution feature at Fontforge

Here is documentation about ApplySubstitution:

ApplySubstitution(script, lang, tag)
All three arguments must be strings of no more than four characters (shorter strings will be padded with blanks to become 4 character strings). For each selected glyph this command will look up that glyph’s list of substitutions, and if it finds a substitution with the tag “tag” (and if that substitution matches the script and language combination) then it will apply the substitution– that is it will find the variant glyph specified in the substitution and replace the current glyph with the variant, and clear the variant.

FontForge recognizes the string “*” as a wildcard for both the script and the language (not for the tag though). So if you wish to replace all glyphs with their vertical variants:

SelectAll()

ApplySubstitution("","","vrt2")

It seems like there are variables for tag and vrt2 is one of them. So, where are the rest? Or tag is just the name of the lookup user created?? If I want to substitute a glyph with another one, how do I do that??? I know the script and Lang variables. Hope someone knows this and guides me in the right direction. Thanks

Tagged:

Comments