Fontforge Scripting how to add ligatures for a glyph -


i'm making font scripting on fontforge. goes well, have problem don't know how specify selected glyph if 2 other glyphs came simultaneously show selected glyph. have made lookuptable , subtable don't know function define ligatures specified glyph. here code making table , subtable adding ligatures glyph.

addlookup("ligatures","gsub_ligature",9,[["rlig",[["arab",["dflt"]]]]]) addlookupsubtable("ligatures","ligatureshi") 

you need specify ligature substitution using tuple of existing glyph names. contrived example:

ligature_name = 'f_l' ligature_tuple = ('f', 'l') font.addlookup('ligatures','gsub_ligature', (),[['rlig',[['arab',['dflt']]]]]) font.addlookupsubtable('ligatures', 'ligatureshi') glyph = font.createchar(-1, ligature_name) glyph.addpossub('ligatureshi', ligature_tuple) 

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -