
Am 18.04.2025 um 13:59 schrieb Sylvain Hubert:
Hello,
1 bug report + 3 questions:
___
# Bug report: \definefallbackfamily ignoring font features
```tex \definefallbackfamily[mainface][rm][Noto Serif][preset=range:greek, sl={style:tf, features:slanted}] \definefontfamily[mainface][rm][latinmodernroman] \setupbodyfont[mainface]
\starttext \sl something αβγ \stoptext ```
The three greek letters are slanted when compiled with older ConTeXt LMTX (before Oct.19, 2024), but they remain upright under the latest version.
___
# Question: ad-hoc font features
I tried to specify ad-hoc font features (see below) in `\definefontfamily` like slant+bold, without naming the feature with `\definefontfeature` since they're not supposed to be reused. But the resulting fonts are always thicker than expected. Then I found that, even with empty effects, `features:{effect={}}` itself makes the font ultra bold.
```tex \definefontfamily[mainface][rm][Noto Serif][sl={style:tf, features: {effect={}}}] \setupbodyfont[mainface]
\starttext \sl something αβγ \stoptext ```
Is this a bug, or is there any justification behind it?
1. \definefontfamily just passes the features argument to the next stage of ConTeXt's font mechanism. 2. It looks like "effect=" produces the same results as "effect={effect=both}" with a thick outline. %%%% begin example \starttext \definedfont[file:NotoSerif-Regular.ttf*default]something αβγ \definedfont[file:NotoSerif-Regular.ttf*effect=,default]something αβγ \definedfont[file:NotoSerif-Regular.ttf*effect={effect=inner},default]something αβγ \definedfont[file:NotoSerif-Regular.ttf*effect={effect=outer},default]something αβγ \definedfont[file:NotoSerif-Regular.ttf*effect={effect=both},default]something αβγ \stoptext %%%% end example
# Question: feature inheritance of `\definefontfamily`
When I customize fonts with \definefontfamily, e.g:
```tex % some other customization with \definefallbackfamily ... \definefontfamily[mainface][rm][latinmodernroman] \definefontfamily[mainface][tt][latinmodernmono] \setupbodyfont[mainface]
\starttext \tt\sl something \stoptext ```
the slanted monospace becomes some kind of italic. To recover the default behavior, the slant variant must be explicitly specified:
```tex % some other customization with \definefallbackfamily ... \definefontfamily[mainface][rm][latinmodernroman] \definefontfamily[mainface][tt][latinmodernmono][sl=lmmonoslant10regular] \setupbodyfont[mainface]
\starttext \tt\sl something \stoptext ```
But it's unproductive to copy-paste full specification (slanted, bold, ...) of the builtin latin modern. Is there any way to avoid this by somehow inheriting the default specification?
\definefontfamily searches for the files based on the family name which is stored in the font and Latin Modern Mono as a font family includes only an italic style but not an oblique one. The slanted version of Latin Modern Mono has been put in a separate family and is therefore ignored because it can't be found when \definefontfamily is looking for files. Wolfgang