michinari.nukazawa
2015-05-07 14:12:09 UTC
I need GSUB Conditional Features on python script.( My next product
intend to challenge a script typefece.)
'aalt'/'calt'
(My blog: FontForge version is today(2015/04).
http://blog-en.michinari-nukazawa.com/2015/04/fontforge-conditional-features-caltaalt.html
)
I writing python script is this:
## add 'aalt' feature
font.addLookup("'aalt' Lookup-01", "gsub_alternate",
(), (("DFLT",("dflt")),("latn",("dflt")),))
# font.select("b.high")
# font.addLookupSubtable("'aalt' Lookup-01", "b")
font.addLookupSubtable("'aalt' Lookup-01", "'aalt' Lookup-01
Subtable-01")
font.addPosSub("'aalt' Lookup-01 Subtable-01", "b b.high")
## add 'calt' feature
font.addLookup("'calt' Lookup-01", "gsub_context",
(), (("DFLT",("dflt")),("latn",("dflt")),))
# matching rule
font.addContextualSubtable("'calt' Lookup-01", "'calt' Lookup-01
Subtable-01",
"class",
"high-after | letters @<'aalt' Access All Alternates in Latin
lookup 0> |",)
# add match class
<I need this setting of match class Name:"letter" / Glyphs
in the class:"a b c d" ...>
Thanks.
intend to challenge a script typefece.)
'aalt'/'calt'
(My blog: FontForge version is today(2015/04).
http://blog-en.michinari-nukazawa.com/2015/04/fontforge-conditional-features-caltaalt.html
)
I writing python script is this:
## add 'aalt' feature
font.addLookup("'aalt' Lookup-01", "gsub_alternate",
(), (("DFLT",("dflt")),("latn",("dflt")),))
# font.select("b.high")
# font.addLookupSubtable("'aalt' Lookup-01", "b")
font.addLookupSubtable("'aalt' Lookup-01", "'aalt' Lookup-01
Subtable-01")
font.addPosSub("'aalt' Lookup-01 Subtable-01", "b b.high")
## add 'calt' feature
font.addLookup("'calt' Lookup-01", "gsub_context",
(), (("DFLT",("dflt")),("latn",("dflt")),))
# matching rule
font.addContextualSubtable("'calt' Lookup-01", "'calt' Lookup-01
Subtable-01",
"class",
"high-after | letters @<'aalt' Access All Alternates in Latin
lookup 0> |",)
# add match class
<I need this setting of match class Name:"letter" / Glyphs
in the class:"a b c d" ...>
Thanks.