[NTG-context] Fallbacks for design sizes in the current typescripts regime
Dear gang, Design sizes for typefaces -- aka "optical sizes" -- are no longer directly implemented in typescripts. From the manual Fonts out of ConTeXt by Hans Hagen, p. 109: "at some point the decision was made to kick out these definitions and move the burden of figuring out the right size to Lua." (Thus some large typescript collections painstakingly built over the years are now obsolete and have to be rewritten. Oh well..) But there is an issue in the new regime: In the old system, every typescript mapping to a font within a design-size range could have its own fallback. For example: % Small ="small point size" % Regular = "regular point size" % Bigger = "bigger point size" % Biggest = "biggest point size" \definefontsynonym [MyRomanRegular] [file:MyFont-Regular.ttf] [features=,fallbacks=] \definefontsynonym [MyRomanSmall] [file:MyFont-Small.ttf] [features=,fallbacks=] \definefontsynonym [MyRomanBigger] [file:MyFont-Bigger.ttf] [features=,fallbacks=] \definefontsynonym [MyRomanBiggest] [file:MyFont-Biggest.ttf] [features=,fallbacks=] In the new typescripts regime we keep one font from the design-size range in the typescript file; the rest of the optical sizes go into an lfg goodies file: \definefontsynonym [MyRomanRegular] \loadfontgoodies[myfonts-opticalsizes] % other three fonts go into an lfg table [file:MyFont-Regular.ttf] [features=,fallbacks=] designsizes = { ["MyRomanRegular"] = { ["7pt"] = "file:MyFont-Small", ["8pt"] = "file:MyFont-Small", ["9pt"] = "file:MyFont-Regular", ["10pt"]= "file:MyFont-Regular", ["11pt"]= "file:MyFont-Regular", ["12pt"]= "file:MyFont-Bigger", ["14pt"]= "file:MyFont-Bigger", ["17pt"]= "file:MyFont-Biggest", ["21pt"]= "file:MyFont-Biggest", default = "file:MyFont-Regular", }, But there is an apparent drawback to this new way of doing things: It appears that only the default font can have an explicit fallback, and there appears that there is no straightforward way to map each of the other design sizes to its own fallback. If there is indeed no way to map each non-default design size to a fallback, then that constitutes a significant/unfortunate loss of functionality in the user interface. If this appearance of a loss reflects the reality of the situation, would like to kindly request that the original functionality be restored to the higher-level user interface, presumably within the lfg file. So perhaps something like a keyval fallbacks = { ["MyRomanRegular"] = { "file:MyFont-Small"= "fallbacks=", "file:MyFont-Regular", = "fallbacks=", "file:MyFont-Bigger", = "fallbacks=", "file:MyFont-Biggest", = "fallbacks=", }, On the other hand, if access to the former functionality is still there somewhere in the user interface, would like to humbly request that someone share where it is and how to use it! Thank you kindly for consideration of this request. Best wishes Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Fallbacks in text font interfere with math accents
Am 10.06.23 um 19:46 schrieb Mikael Sundqvist via ntg-context: Hi, On Sat, Jun 10, 2023 at 10:06 AM Henning Hraban Ramm via ntg-context wrote: Hi, this is probably for Hans & Mikael, but maybe someone else has a hint: If I set a fallback for my body font to catch all missing characters, some math accents get replaced by small bold uppercase characters (I found hat by K and ring by T so far). I tried [fallbacks=] for math to no avail. My example uses Cambria, but it’s the same with other fonts. (BTW, in \bar{b} with Libertinus, the bar looks too high.) I leave the font fallbacks to Hans or somebody else, but for the \bar one can argue that the "305 glyph in Libertinus Math sits too high. This is adjusted for in the goodie file in the next upload. I could fix a few math accents (e.g. widebar) by limiting my replacements to necessary glyphs, but many other problems remain (e.g. breve, check, dot, widehat). It also affects the sizing of limiters and e.g. underbraces. Why do font fallbacks for non-math fonts affect math at all? Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Fallbacks in text font interfere with math accents
Hi, On Sat, Jun 10, 2023 at 10:06 AM Henning Hraban Ramm via ntg-context wrote: > > Hi, this is probably for Hans & Mikael, but maybe someone else has a hint: > > If I set a fallback for my body font to catch all missing characters, > some math accents get replaced by small bold uppercase characters (I > found hat by K and ring by T so far). > > I tried [fallbacks=] for math to no avail. > > My example uses Cambria, but it’s the same with other fonts. > > (BTW, in \bar{b} with Libertinus, the bar looks too high.) I leave the font fallbacks to Hans or somebody else, but for the \bar one can argue that the "305 glyph in Libertinus Math sits too high. This is adjusted for in the goodie file in the next upload. /Mikael ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Fallbacks in text font interfere with math accents
Hi, this is probably for Hans & Mikael, but maybe someone else has a hint: If I set a fallback for my body font to catch all missing characters, some math accents get replaced by small bold uppercase characters (I found hat by K and ring by T so far). I tried [fallbacks=] for math to no avail. My example uses Cambria, but it’s the same with other fonts. (BTW, in \bar{b} with Libertinus, the bar looks too high.) Hraban \definefontfallback[symbolaFB] [file:symbola.otf] [0x0-0xF] [check=no,force=no] \definefontfallback[arialFB] [name:arialunicodems] [0x0-0xF] [check=no,force=no,rscale=0.85] \starttypescript [contextstart] \definetypeface [contextstart] [rm] [serif] [cambria] [default][fallbacks=symbolaFB] \definetypeface [contextstart] [ss] [sans] [segoe] [default][fallbacks=arialFB] \definetypeface [contextstart] [tt] [mono] [modern] [default][fallbacks=arialFB] \definetypeface [contextstart] [mm] [math] [cambria] [default] \stoptypescript \setupbodyfont[contextstart,12pt] \starttext \im{\hat{H} \widehat{HAT} \bar{b} \widebar{bar}} \im{\mathring{+} \mathring{±} \mathring{x}} \stoptext mathtest.tex Description: TeX document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] fallbacks
I believe it's a bug. https://github.com/contextgarden/context/blob/d025bcdf995be6951f69fed6869048ab22491b9e/tex/context/base/mkxl/font-col.lmt#L278 the newchar[] table, which should contain all chars supported by the fallback termes font if I'm not mistaken, turns out to have only 392 chars within 0x20-0x30C, far away from 0x2329-0x232A. On Sun, 23 Apr 2023 at 03:26, Thomas A. Schmitz via ntg-context < ntg-context@ntg.nl> wrote: > Thank you, Pablo, but that doesn't help. I know how to use fallback > fonts. I was wondering if the check key is working as it should. > > Thomas > > On 4/22/23 20:33, Pablo Rodriguez via ntg-context wrote: > > Hi Thomas, > > > > I don’t know what check does (maybe just check?), but the standard > > behaviour with \definefallbackfamily is only to fall back when the > > character is missing from the main font. > > > > To force all characters from the range in the fallback font, "force=yes" > > is required. > > > > Here you have a minimal sample (which doesn‘t use "preset=range:greek"), > > adding "force=yes" gets all Greek glyphs from GFS Heraklit: > > > >\definefallbackfamily [presentation] [serif] [GFSHeraklit] > >[range={greekandcoptic, greekextended}] > >\definefontfamily [presentation] [serif] [TeXGyrePagella] > >\setupbodyfont [presentation,12pt] > > > >\starttext > >Pπμᾷσδ > >\stoptext > > > > Just in case it might help, > > -- > Prof. Dr. Thomas A. Schmitz > Institut für Klassische und Romanische Philologie > Universität Bonn > Am Hof 1e > 53113 Bonn > http://www.philologie.uni-bonn.de/de/personal/schmitz > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] fallbacks
Thank you, Pablo, but that doesn't help. I know how to use fallback fonts. I was wondering if the check key is working as it should. Thomas On 4/22/23 20:33, Pablo Rodriguez via ntg-context wrote: Hi Thomas, I don’t know what check does (maybe just check?), but the standard behaviour with \definefallbackfamily is only to fall back when the character is missing from the main font. To force all characters from the range in the fallback font, "force=yes" is required. Here you have a minimal sample (which doesn‘t use "preset=range:greek"), adding "force=yes" gets all Greek glyphs from GFS Heraklit: \definefallbackfamily [presentation] [serif] [GFSHeraklit] [range={greekandcoptic, greekextended}] \definefontfamily [presentation] [serif] [TeXGyrePagella] \setupbodyfont [presentation,12pt] \starttext Pπμᾷσδ \stoptext Just in case it might help, -- Prof. Dr. Thomas A. Schmitz Institut für Klassische und Romanische Philologie Universität Bonn Am Hof 1e 53113 Bonn http://www.philologie.uni-bonn.de/de/personal/schmitz ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] fallbacks
On 4/22/23 18:05, Thomas A. Schmitz via ntg-context wrote: > Hi all, > > today, I was struggling with a fallback font I had defined, and I > discovered that the key "check" doesn't work as I expected. > [...] > If I have "check=no," the characters are taken from termes and replaced. > I was under the impression that "check" should, well, check if the > characters are not in the main font and fall back to the fallback font > if they are not, but this doesn't appear to be the case. Hi Thomas, I don’t know what check does (maybe just check?), but the standard behaviour with \definefallbackfamily is only to fall back when the character is missing from the main font. To force all characters from the range in the fallback font, "force=yes" is required. Here you have a minimal sample (which doesn‘t use "preset=range:greek"), adding "force=yes" gets all Greek glyphs from GFS Heraklit: \definefallbackfamily [presentation] [serif] [GFSHeraklit] [range={greekandcoptic, greekextended}] \definefontfamily [presentation] [serif] [TeXGyrePagella] \setupbodyfont [presentation,12pt] \starttext Pπμᾷσδ \stoptext Just in case it might help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] fallbacks
Hi all, today, I was struggling with a fallback font I had defined, and I discovered that the key "check" doesn't work as I expected. Here's a small example: \definefallbackfamily [presentation] [serif] [TeXGyreTermes] [range=0x2329-0x232A,check=yes] \definefontfamily [presentation] [serif] [AntykwaTorunska] \setupbodyfont [presentation,12pt] \starttext (〈P〉) \stoptext With this input, the two characters 〈 and 〉 are not typeset; in the log, I find fonts > checking > char 〈 (U+02329) in font 'AntykwaTorunska-Regular' with id 1: missing fonts > checking > char 〉 (U+0232A) in font 'AntykwaTorunska-Regular' with id 1: missing If I have "check=no," the characters are taken from termes and replaced. I was under the impression that "check" should, well, check if the characters are not in the main font and fall back to the fallback font if they are not, but this doesn't appear to be the case. So what does "check" do? Or is this a bug? Have a great weekend Thomas ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] fallbacks for math fonts
Hello, I like to use Latin Modern Math as my math font but it lacks some glyphs like \cong=0x02245. I would like to know (if possible, with a working example) if font fallbacks feature is available for math fonts. Mehdi ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] fallbacks for characters
Hi all, the answer to this one may be completely obvious, but I haven't found anything: I know we can define fallback fonts in mkiv, but is it possible to define fallbacks for single characters. Let's take 0x0113, emacron. Is it possible to define if character is present in current font, use it; else \buildtextaccent\macron e ? 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://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] fallbacks for characters
On Oct 16, 2008, at 11:26 AM, Wolfgang Schuster wrote: On Thu, Oct 16, 2008 at 9:47 AM, Thomas A. Schmitz [EMAIL PROTECTED] wrote: Hi all, the answer to this one may be completely obvious, but I haven't found anything: I know we can define fallback fonts in mkiv, but is it possible to define fallbacks for single characters. Let's take 0x0113, emacron. \definefontfallback [myfallback] [Fallbackfont] [0x0113] [force=yes|no,check=yes|no] % check : only replace when present in replacement font (default: no) % force : force replacent even when basefont has glyph (default: yes) Is it possible to define if character is present in current font, use it; else \buildtextaccent\macron e ? Wolfgang, thanks for your answer! But if I understand definefontfallback correctly, this will define a replacement font - that's not what I want. I want to take glyphs from the same font, either the matching glyph or a composite one. 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://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] fallbacks for characters
On Thu, Oct 16, 2008 at 9:47 AM, Thomas A. Schmitz [EMAIL PROTECTED] wrote: Hi all, the answer to this one may be completely obvious, but I haven't found anything: I know we can define fallback fonts in mkiv, but is it possible to define fallbacks for single characters. Let's take 0x0113, emacron. \definefontfallback [myfallback] [Fallbackfont] [0x0113] [force=yes|no,check=yes|no] % check : only replace when present in replacement font (default: no) % force : force replacent even when basefont has glyph (default: yes) Is it possible to define if character is present in current font, use it; else \buildtextaccent\macron e ? Wolfgang ___ 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://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___