Negative font slant broken with compact fonts

Hi, Using the latest ConTeXt (2025.02.19), negative slants are broken with compact fonts. Example document: \definefontfeature[default][default][Slant=-1] \startTEXpage Hello, world! \stopTEXpage When compiled with "context", I get the error message tex error > tex error on line 1 in file ./context-negative-slant.tex: Scale factor (-1000) should be in the range 0..100000 [...] I'm going to use 0 instead of that illegal code value. but when compiled with "context --nocompactfonts", I get the correct result. Thanks, -- Max

On 3/19/25 10:51, Max Chernoff via ntg-context wrote:
Hi,
Using the latest ConTeXt (2025.02.19), negative slants are broken with compact fonts. Example document:
Hi Max, my current latest is from 2025.02.28 18:16.
\definefontfeature[default][default][Slant=-1]
\startTEXpage Hello, world! \stopTEXpage
When compiled with "context", I get the error message
I get no error an no slanted font.
but when compiled with "context --nocompactfonts", I get the correct result.
I’m afraid I get no slanted fonts with "--nocompactfonts". Weird, I use LuaMetaTeX 2.11.07 20250226 and I have to enable compact fonts in Linux-64 with that version. I also have been experiencing an issue already reported before (https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/thread/GWDVD3CNPJQOH...). Either slanted is specified for \definefontfamily or it doesn’t work for \definefallbackfamily: \enableexperiments[fonts.compact] \definefallbackfamily [mainface][rm][Dejavu Sans] [sl={style:regular, features:slanted},preset=range:greek] \definefontfamily [mainface][rm][Latin Modern Sans] %[sl={style:regular, features:slanted}] \setupbodyfont [mainface] \starttext αβγ9 some word others\\ \sl αβγ9 some word others \stoptext I wonder whether these issues might be somehow related. Just in case it might help, Pablo

Hi Pablo, On Wed, 2025-03-19 at 18:00 +0100, Pablo Rodriguez via ntg-context wrote:
Weird, I use LuaMetaTeX 2.11.07 20250226
Ah, my binaries must have not updated properly since I still had 2.11.06. I deleted the binaries and reran the updater, so I now have 2.11.07. I also deleted the system and user format/font caches just in case there was a problem there.
When compiled with "context", I get the error message
I get no error an no slanted font.
but when compiled with "context --nocompactfonts", I get the correct result.
I’m afraid I get no slanted fonts with "--nocompactfonts".
I tried it again now (after updating), and with compact fonts I still get the same error, and with "--nocompactfonts" I get the reverse-slanted font, as expected.
in Linux-64 with that version.
Hmm, I'm also on Linux x86_64 with the same version, so it's really weird that we get different results.
I also have been experiencing an issue already reported before (https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/thread/GWDVD3CNPJQOH...).
Either slanted is specified for \definefontfamily or it doesn’t work for \definefallbackfamily:
\enableexperiments[fonts.compact] \definefallbackfamily [mainface][rm][Dejavu Sans] [sl={style:regular, features:slanted},preset=range:greek] \definefontfamily [mainface][rm][Latin Modern Sans] %[sl={style:regular, features:slanted}] \setupbodyfont [mainface] \starttext αβγ9 some word others\\ \sl αβγ9 some word others \stoptext
I wonder whether these issues might be somehow related.
I tried compiling that document just now, and with the "sl=" uncommented, I get the correctly-slanted Greek letters, both with and without compact fonts enabled. This is really weird. Maybe try deleting your luametatex binary and rerunning the updater to make sure that your binaries are up-to-date, and try deleting your user/system font/format caches? Thanks, -- Max

On 3/20/25 00:57, Max Chernoff via ntg-context wrote:
On Wed, 2025-03-19 at 18:00 +0100, Pablo Rodriguez via ntg-context wrote:
Weird, I use LuaMetaTeX 2.11.07 20250226
Hi Max, sorry, wrong testing here. I do get your error as long as I don’t put the font feature definition after \starttext. BTW, I needed to add an \stoptext, because my file for test is a huge concatenation of previous tests.
I tried compiling that document just now, and with the "sl=" uncommented, I get the correctly-slanted Greek letters, both with and without compact fonts enabled.
This is really weird. Maybe try deleting your luametatex binary and rerunning the updater to make sure that your binaries are up-to-date, and try deleting your user/system font/format caches?
I have just done it and it works now with some caveats (I think this might have worked before [but I cannot test that now]): 1. \enableexperiments[fonts.compact] shouldn’t be loaded in the source. 2. "context testing.tex" doesn’t get the fake slanted font, but "context --environment=testing.tex whatever.xml" has it. 3. "context --result=whatever.pdf testing.tex" doesn’t get the fake slanted font. 4. "context --compactfonts --environment=testing.tex whatever.xml" contains the fake slanted font (just in case anyone wonders). I don’t know what I am doing wrong (or what I may be missing here). Many thanks for your help, Pablo PS: the final source for this testing reads (just to be clear, since this seems to be too tricky [at least, to me]) \definefallbackfamily [mainface][rm][DejaVu Sans] [sl={style:regular, features:slanted},preset=range:greek] \definefontfamily [mainface][rm][Latin Modern Sans] \setupbodyfont [mainface] \starttext αβγ9 some word others\\ \sl αβγ9 some word others \stoptext
participants (2)
-
Max Chernoff
-
Pablo Rodriguez