Felix schrieb am 13.09.2024 um 08:02:
Hello Wolfgang, so if I follow your code examp,e what if I were to edit my code to be like this:
\definefontfeature[generalfeatures][default][ kern=yes, % enables kerning extrakerns=yes, % enables extra kerning trep=yes, % Enables single and double quotes to show up correctly in text, perhaps does more liga=yes, % Enables ligatures. itlc=yes, % Activates italic correction. mark=yes, % Used for positioning diacritical marks (accents, dots, etc.) relative to base characters. mkmk=yes, % positions diacritical marks relative to other marks locl=yes, ccmp=yes, % Composes multiple characters into a single glyph or breaks down ligatures. mode=node, protrusion=yes, expansion=yes, language=dflt, ]
\definefontfamily [myfonts] [rm] [Times New Roman] [features=generalfeatures,dlig=yes,cpsp=yes,% dlig enables times new roman ligatures, and cpsp is used by tnr, not aptos] \definefontfamily [myfonts] [ss] [Aptos] [features=generalfeatures,] \definetypeface [myfonts] [mm] [math] [stixtwo] [features=generalfeatures,]
\setupbodyfont[myfonts,12pt]
do you think this code is flawed?
Stay with the following basic setups and add only expansion or protrusion when you use the features in your document, otherwise there is no need for them. \definefontfeature [times] [default] [trep=yes,dlig=yes] \definefontfeature [aptos] [default] [trep=yes] \definefontfamily [myfonts] [rm] [Times New Roman] [features=times] \definefontfamily [myfonts] [ss] [Aptos] [features=aptos] \definefontfamily [myfonts] [tt] [Aptos Mono] [features=none] \definetypeface [myfonts] [mm] [math] [stixtwo] \setupbodyfont[myfonts,12pt] \starttext \samplefile{lorem} \stoptext
Also, do you think you could explain how locl and extrakerns works? do I need to have kern=yes for it to enable? how can I test if extrakerns Is working? when I just have kern=yes enable, and then enable extra, a pdf that has a paragraph using both in code looks the same. locl is something I'm completely unsure about.
1. Many features above are part of the default set. 2. When you don't know what the effect of an opentype feature is (look at https://www.preusstype.com/techdata/features.php for a few examples) don't enable it because you can get an unexpected output in your document. It is also important to know what your font makes with the feature because like I previously mentioned Times New Roman uses dlig to produce standard ligatures which isn't what you expect here. Wolfgang