Changes

Jump to navigation Jump to search
54 bytes added ,  14:19, 8 June 2020
m
no edit summary
This is an example on how missing ligatures can be used:
<texcode>\definefontfeature[thetimes][default][mode=node,featurefile=times_fl.fea] \starttypescript [serif] [TimesNR] [name] \setups[font:fallback:serif] \definefontsynonym [Serif] [file:Times New Roman.ttf] [features=thetimes] \definefontsynonym [SerifBold] [file:Times New Roman Bold.ttf] [features=thetimes] \definefontsynonym [SerifItalic] [file:Times New Roman Italic.ttf] [features=thetimes] \definefontsynonym [SerifBoldItalic][file:Times New Roman Bold Italic.ttf][features=thetimes] \stoptypescript \starttypescript[TimesNR] \definetypeface [TimesNR] [rm] [serif] [TimesNR] [default]\stoptypescript \starttypescript[TheTimes] \definetypeface [TheTimes] [rm] [serif] [TimesNR] [default]\stoptypescript \mainlanguage[de]\usetypescript[TheTimes]\setupbodyfont[TheTimes, 10pt]
\starttypescript[TimesNR] \definetypeface [TimesNR] [rm] [serif] [TimesNR] [default] \stoptypescriptstarttext
\starttypescript[TheTimes] \definetypeface [TheTimes] [rm] [serif] [TimesNR] [default] \stoptypescriptHoffnung finden: fliegen
\mainlanguage[de] \usetypescript[TheTimes]stoptext \setupbodyfont[TheTimes, 10pt] \starttext Hoffnung finden: fliegen \stoptext</texcode>
The feature file that is used "times_fl.fea" looks like this:
<pre>
lookup fligatures {
lookupflag 0;
sub \f \i by \fi;
sub \f \l by \fl;
} fligatures;
lookup fligatures { lookupflag 0; sub \f \i by \fi; sub \f \l by \fl; } fligatures; feature liga { script DFLT; language dflt ; lookup fligatures; script latn; language dflt ; lookup fligatures; } liga;</pre>
This is another example showing how improved kerning can be added to the font via feature files:
<texcode>\definefontfeature[thetimes][default][mode=node,featurefile=times_kern.fea] \starttypescript [serif] [TimesNR] [name] \setups[font:fallback:serif] \definefontsynonym [Serif] [file:Times New Roman.ttf] [features=thetimes] \definefontsynonym [SerifBold] [file:Times New Roman Bold.ttf] [features=thetimes] \definefontsynonym [SerifItalic] [file:Times New Roman Italic.ttf] [features=thetimes] \definefontsynonym [SerifBoldItalic][file:Times New Roman Bold Italic.ttf][features=thetimes] \stoptypescript
\starttypescript[TimesNR] \definetypeface [TimesNR] [rm] [serif] [TimesNR] [default] \stoptypescript
\starttypescript[TheTimes] \definetypeface [TheTimes] [rm] [serif] [TimesNR] [default] \stoptypescript
\mainlanguage[de] \usetypescript[TheTimes] \setupbodyfont[TheTimes, 10pt]
\starttext
„W
\stoptext</texcode>
The feature file that is used here "times_kern.fea" looks like this:
feature kern {
script DFLT;
language dflt ;
lookup MyKerns; script latn;
language dflt ;
lookup MyKerns;
} kern;
"when you change the file or the name (or remove it) the font will be recached".
 
 
[[Category:Old_Content]]

Navigation menu