Changes

Jump to navigation Jump to search
51 bytes added ,  13:57, 14 March 2021
m
no edit summary
Sometimes you want to provisionally add OpenType features to a font. There are at least three ways to do this.
# Use a low-level `font.handlers.otf.addfeature` callback function to define new OTF features. See Section 8.14 of [https://www.pragma-ade.com/general/manuals/fonts-mkiv.pdf fonts-mkiv manual] for details of the syntax. , or refer to the examples [http://minimals.metatex.org/current/context/test/doc/context/tests/mkiv/fonts/extensions-001.tex here].
# Define the new features in an `lfg` "goodies" file and load it with the `goodies` key. See [http://minimals.metatex.org/current/context/test/doc/context/tests/mkiv/fonts/greek-001.tex this example] with the corresponding [http://minimals.metatex.org/current/context/test/doc/context/tests/mkiv/fonts/oxoniensis.lfg lfg] file.
# Use a feature file (in the `fea` format) and load it with the `featurefile` key. See [[Fontfeaturefiles]].
=== Debugging features ===
Note: For an OpenType to work properly, all the relevant glyphs must come from the same font (either the original font or one of the fallbacks). For example, the font [https://github.com/aminabedi68/Mikhak/tree/master/Font/ttf Mikhak] now misses glyphs for en dash and em dash, hence the `tlig` feature does not work to automatically change double or triple dashes to en and em dashes. This would not work even if we added fallback fallbacks for those two characters. However, if we also create a fallback for the dash character, then this will work.
<texcode>
<texcode>
\starttext
\setupalign[r2l]% -1 for the second argument means RTL. Leave it out for LTR text.\showotfcomposition{mikhak-medium*arabic}{-1}{سلام علیکم}
\stoptext
</texcode>
25

edits

Navigation menu