Gerion Entrup schrieb am 27.08.2024 um 21:28:
Hi,
I played around with different fonts, especially Bitstream XCharter and
Overpass (http://overpassfont.org/) and wanted to combine them.
However, I see some issues regarding ligatures, kerning and obliques/italics.
Here is a minimal example:
```
\definefontfeature[default][mode=node, kern=yes, liga=yes]
% more features
% [mode=node, kern=yes, liga=yes, tlig=yes, itlg=yes, ccmp=yes, language=dflt,
protrusion=quality, expansion=quality]
There is no need to set default features like ligatures and kerning, the
better alternative here is to use
\definefontfeature [default] [default] [protrusion=quality,...]
which adds additional settings to the default set.
\definefontfamily [myfont][roman][xcharter]
\definefontfamily [myfont][sansserif][overpass][rscale=0.93]
\definefontfamily [myfont][teletype][overpass][rscale=0.93]
\definefontfamily [myfont][mono][overpassmono][rscale=0.93]
\definetypeface [myfont][mathematics][math] [xcharter]
\setupbodyfont[myfont, 11pt]
\startTEXpage
\showfontkerns
Vitae, Vase, LT, VA, Y., Effizient, abcdel™, \italic{effi
abcdel™}, \slanted{effi abcdel™}\\
\style[sans]{Vitae, Vase, LT, VA, Y., Effizient, abcdel™, \italic{effi
abcdel™}, \slanted{effi abcdel™}}\\
\style[mono]{Vitae, Vase, LT, VA, Y., Effizient, abcdel™, \italic{effi
abcdel™}, \slanted{effi abcdel™}}\\
\showbodyfont[myfont]
\stopTEXpage
```
It produces the PDF in the attachment. I'm struggling with several things:
- xcharter seems to have no kerning applied. It is listed as font feature,
though. Is it correct to have no kerning at all for that font?
The font has kerning information but none for characters in the ASCII range.
- xcharter also have no ligatures (at least it doesn't look like that). That is
listed as font feature, too, although only for italic and slanted. According to
https://tug.org/FontCatalogue/xcharter/ there are ligatures in the font.
There are ligatures for ff[il].
- Overpass has a glyph for the ae ligature. Is it normal that it is not used as
a ligature for ae?
This seems to be a stupid decision to replace ae by default with a
ligature, maybe dependent on the language but not for all of them.
- Overpass Mono does not contain italic glyphs. I would have expected obliques
when using \slanted then. However, it just remains normal.
You can use the slanted feature for this but the default setting is to
fall back to the upright alternative and you as a user has to make the
choice.
Example: \definefontfamily[myfont][tt][overpassmono][sl={features:slanted}]
- I included the ™ in the example since its italic glyph is not slanted. For
all fonts \slanted seems to switch to the extra (italic?) glyphs, while I would
have expected obliques. At least overpass seems to have no dedicated slanted
style, while xcharter has one.
How a glyph for a certain styles appears depends on the font designer.
When you use \definefontfamily you get always the same style for italic
and slanted because most fonts provide only italic or oblique (but not
both). In some case you do something like the following font setting but
the best solution when you have a large font family have is to write a
typescript.
\definefontfamily[myfont][rm][xcharter][sl=style:slanted]
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________