Bug report about \definefallbackfamily and other questions

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? ___ # 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? ___ # Question: ConTeXt LMTX version control Where can one find older releases of ConTeXt LMTX when encountering problems like the bug above? https://github.com/contextgarden/context looks promising, but it doesn't provide release artifacts, nor build instructions. I could help add a workflow for automated release to it if someone kindly provides a built instruction. ___ Best regards, Sylvain

On 4/18/2025 1:59 PM, Sylvain Hubert wrote:
# Question: ConTeXt LMTX version control
Where can one find older releases of ConTeXt LMTX when encountering problems like the bug above? https://github.com/contextgarden/context https://github.com/contextgarden/context looks promising, but it doesn't provide release artifacts, nor build instructions. I could help add a workflow for automated release to it if someone kindly provides a built instruction.
just run the build script in source and move the result Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------

On 4/18/2025 1:59 PM, Sylvain Hubert wrote:
Hello,
1 bug report + 3 questions:
These are for Wolfgang but shouldn't you set the style to sl? \definefallbackfamily [mainface] [rm] [Noto Serif] [preset=range:greek,sl={style:sl,features:slanted}] I'm not sure if selectfont has been adapted to compact fonts so you can try to run with --nocompactfonts Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------

Am 18.04.2025 um 20:07 schrieb Hans Hagen via ntg-context:
On 4/18/2025 1:59 PM, Sylvain Hubert wrote:
Hello,
1 bug report + 3 questions:
These are for Wolfgang but shouldn't you set the style to sl?
\definefallbackfamily [mainface] [rm] [Noto Serif] [preset=range:greek,sl={style:sl,features:slanted}]
I'm not sure if selectfont has been adapted to compact fonts so you can try to run with
--nocompactfonts
The same result can be reproduced without \definefontfamily and is limited to compact fonts. \definefontfallback [FallbackRegular] [file:notoserifregular*default,slanted] [greekandcoptic] \definefontsynonym [MainfaceRegular] [SerifSlanted] [features=default,fallbacks=FallbackRegular] \starttext \definedfont[MainfaceRegular]something αβγ \stoptext Wolfgang

On 4/18/25 20:24, Wolfgang Schuster wrote:
[...] The same result can be reproduced without \definefontfamily and is limited to compact fonts.
\definefontfallback [FallbackRegular] [file:notoserifregular*default,slanted] [greekandcoptic]
\definefontsynonym [MainfaceRegular] [SerifSlanted] [features=default,fallbacks=FallbackRegular]
\starttext \definedfont[MainfaceRegular]something αβγ \stoptext
Hi Hans and Wolfgang, I reproduce the result when compiling source.tex with: context source.tex But I get slanted Greek glyphs using source.tex as environment: context --environment=source.tex whatever.tex For your information, just in case it might help, Pablo

Am 23.04.2025 um 19:07 schrieb Pablo Rodriguez via ntg-context:
On 4/18/25 20:24, Wolfgang Schuster wrote:
[...] The same result can be reproduced without \definefontfamily and is limited to compact fonts.
\definefontfallback [FallbackRegular] [file:notoserifregular*default,slanted] [greekandcoptic]
\definefontsynonym [MainfaceRegular] [SerifSlanted] [features=default,fallbacks=FallbackRegular]
\starttext \definedfont[MainfaceRegular]something αβγ \stoptext
Hi Hans and Wolfgang,
I reproduce the result when compiling source.tex with:
context source.tex
But I get slanted Greek glyphs using source.tex as environment:
context --environment=source.tex whatever.tex
For your information, just in case it might help,
What is the content of both files? Wolfgang

On 4/23/25 20:33, Wolfgang Schuster wrote:
Am 23.04.2025 um 19:07 schrieb Pablo Rodriguez via ntg-context: [...]
What is the content of both files?
The contents of "source.tex" read: \definefontfallback [FallbackRegular] [file:NotoSerif.ttf*default,slanted] [greekandcoptic] \definefontsynonym [MainfaceRegular] [SerifSlanted] [features=default,fallbacks=FallbackRegular] \starttext \definedfont[MainfaceRegular]something αβγ \stoptext "whatever.tex" is a non-existing file. Many thanks for your help, Pablo

Am 23.04.2025 um 19:07 schrieb Pablo Rodriguez via ntg-context:
On 4/18/25 20:24, Wolfgang Schuster wrote:
[...] The same result can be reproduced without \definefontfamily and is limited to compact fonts.
\definefontfallback [FallbackRegular] [file:notoserifregular*default,slanted] [greekandcoptic]
\definefontsynonym [MainfaceRegular] [SerifSlanted] [features=default,fallbacks=FallbackRegular]
\starttext \definedfont[MainfaceRegular]something αβγ \stoptext
Hi Hans and Wolfgang,
I reproduce the result when compiling source.tex with:
context source.tex
But I get slanted Greek glyphs using source.tex as environment:
context --environment=source.tex whatever.tex
For your information, just in case it might help,
Doesn't work for me because ConTeXt complains about the missing file. runtime error : input file './whatever.tex' is not found, quitting mtx-context | fatal error: return code: 1 Wolfgang

On 4/24/25 17:39, Wolfgang Schuster wrote:
[...] Doesn't work for me because ConTeXt complains about the missing file.
runtime error : input file './whatever.tex' is not found, quitting mtx-context | fatal error: return code: 1
Weird, I only get a warning: context --purgeall --environment=source.tex whatever.tex mtx-context | warning: no (local) file './whatever.tex', proceeding I’m on Linux-64bit, but I thought macOS wouldn’t be that different. Pablo

Am 24.04.2025 um 19:40 schrieb Pablo Rodriguez via ntg-context:
On 4/24/25 17:39, Wolfgang Schuster wrote:
[...] Doesn't work for me because ConTeXt complains about the missing file.
runtime error : input file './whatever.tex' is not found, quitting mtx-context | fatal error: return code: 1
Weird, I only get a warning:
context --purgeall --environment=source.tex whatever.tex mtx-context | warning: no (local) file './whatever.tex', proceeding
I tested your example in a different folder and it works now. The reason why using the environment works is because compact fonts haven't been enabled yet at this point and the font is therefore loaded with the old mode. Wolfgang

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
participants (4)
-
Hans Hagen
-
Pablo Rodriguez
-
Sylvain Hubert
-
Wolfgang Schuster