Re: [NTG-context] Switching fonts changes framedtext justification
On 4/5/22 03:16, Thangalin via ntg-context wrote: >> The font is too old, but the TTF version works just fine on both Linux >> and Windows. > > No dice with LMTX 2022.04.01 09:37 and the TTF file. Using the TTF, > the emojis don't appear, but the text is justified. Using the OTF, the > emojis appear, but the text is unjustified. Both things work on both Linux and Windows systems. \definefontfamily[emoj][rm][OpenSansEmoji] \setupbodyfont[emoj] \starttext \startTEXpage[offset=1em, align=center] Welcome to the future,\\human ! \stopTEXpage \startframedtext \input zapf \stopframedtext \stoptext > What version of ConTeXt are you using, Pablo? Current latest from 2022.04.01 09:37. Binaries for 64bits on both OS. Just in case it may help, I recommend the following approach. 1. Remove the file OpenSansEmoji.ttf. 2. Remove the directory tex/texmf-cache/luametatex-cache. 3. Run mtxrun --generate. 4. Compile the sample above. BTW, "mtxrun --scripts cache --erase" doesn’t work for me (just in case anyone wonders). I hope it may help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] modify kern between two glyphs
There's a problem with oldstyle glyphs, because they have different codes inside a font. I used fontforge to find the "four.oldstyle" glyph, whose code is 0xf734. But then I discovered that the 'four.oldstyle' key works the same in the lua table. This is the updated MWE, suitable for oldstyle glyphs too. -- \mainlanguage[it] % modified from http://www.pragma-ade.com/context/latest/cont-tst.zip % file: doc/context/tests/mkiv/fonts/extensions-001.tex \startluacode fonts.handlers.otf.addfeature { name = "ktest", type = "kern", data = { [ '’' ] = { [ '4' ] = -100, [ 0xf734 ] = -150, -- four.oldstyle code -- [ 'four.oldstyle' ] = -150, -- this is the same as the previous line }, } } \stopluacode \definefontfeature[ktest][ktest=yes] \definefontfeature[onum][onum=yes] \starttext Default: «Questo è successo nel ’48». Desired: «Questo è successo nel ’\kern-.1em 48». Solved: \feature[+][ktest]«Questo è successo nel ’48». Onum: \feature[+][onum]«Questo è successo nel ’48». \stoptext -- Massi ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] modify kern between two glyphs
Il 05/04/22 13:54, Hans Hagen via ntg-context ha scritto: On 4/5/2022 1:45 PM, mf via ntg-context wrote: It's defined in typo-fkr.lua, but I can't understand what parameters to pass and whether it's the right macro. It looks like it's not. look at the extension examples in the test suite: you can define a kern pair positioning feature than you enable for just that font Thanks Hans, here's the working MWE: --- \mainlanguage[it] % from http://www.pragma-ade.com/context/latest/cont-tst.zip % file doc/context/tests/mkiv/fonts/extensions-001.tex \startluacode fonts.handlers.otf.addfeature { name = "ktest", type = "kern", data = { [ '’' ] = { [ '4' ] = -100 }, } } \stopluacode \definefontfeature[ktest][ktest=yes] \starttext Default: «Questo è successo nel ’48». Desired: «Questo è successo nel ’\kern-.1em 48». Solved: \feature[+][ktest]«Questo è successo nel ’48». \stoptext -- Massi ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] modify kern between two glyphs
On 4/5/2022 1:45 PM, mf via ntg-context wrote: It's defined in typo-fkr.lua, but I can't understand what parameters to pass and whether it's the right macro. It looks like it's not. look at the extension examples in the test suite: you can define a kern pair positioning feature than you enable for just that font 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 - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] modify kern between two glyphs
Il 05/04/22 13:15, Thomas A. Schmitz via ntg-context ha scritto: On 5. Apr 2022, at 13:02, mf via ntg-context wrote: Is it possible to solve it globally and only for a single font? Thanks, Massi Have you looked at chapter 5.4 “Goodies” of fonts-mkiv.pdf? That should get you started. Thanks Thomas, there seems to be nothing for that in the "Goodies" chapter. I'd already found \setextrafontkerns at "8.12 Extra font kerns" of the same manual. It's defined in typo-fkr.lua, but I can't understand what parameters to pass and whether it's the right macro. It looks like it's not. I'm expecting there's a lua font table with glyph pairs kerning to update. Massi ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] modify kern between two glyphs
> On 5. Apr 2022, at 13:02, mf via ntg-context wrote: > > Is it possible to solve it globally and only for a single font? > > Thanks, > Massi Have you looked at chapter 5.4 “Goodies” of fonts-mkiv.pdf? That should get you started. Thomas ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] modify kern between two glyphs
Hello list, I need to modify the kern between two glyphs. This is a MWE where the problem is solved manually: -- \mainlanguage[it] \starttext Default: «Questo è successo nel ’48». Desired: «Questo è successo nel ’\kern-.1em 48». \stoptext -- Is it possible to solve it globally and only for a single font? Thanks, Massi ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___