Confusion with fonts
I've got a small ConTeXt source file, that is a minimization of a file generated by the the ConTeXt output of pandoc using pandoc features to set the main font to ebgaramond: \definefallbackfamily[mainface][rm][CMU Serif][preset=range:greek, force=yes] \definefontfamily[mainface][rm][ebgaramond] \definefontfamily[mainface][mm][Latin Modern Math] \definefontfamily[mainface][ss][Latin Modern Sans] \definefontfamily[mainface][tt][Latin Modern Typewriter][features=none] \setupbodyfont[mainface] \starttext Is this text in Pagella? \stoptext When I run it through context it works and produces output that uses the EBGaramond font. The following also work: antykwapoltawskiego, asana, cambria, charter, ebgaramond, gentium, inconsolata, iwona, kurier, lato, punknova, stix, and xits. But other things, like palatino and pagella and dejavu. Those end up using Latin Modern Roman. I realize I don't understand ConTeXt's font handling and typescripts very well, could someone explain why some of those things work, and others don't? I'll note that pandoc generates this because it lets users of pandoc specify different fonts for the main body font, the math font, the sans font, and the mono font. Can anybody suggest a different way of doing that, which works more often or more simply? -- T. Kurt Bond, tkurtbond@gmail.com, https://tkurtbond.github.io
On 12/6/20 1:03 PM, T. Kurt Bond wrote:
[...] \definefontfamily[mainface][mm][Latin Modern Math]
Hi Kurt, this triggers an error in current latest (2020.12.04 20:22): backend > blocked > function 'setmapfile' is not accessible Using LMTX, it seems to be "Latin Modern Roman Math". I wonder whether this is an intended new feature or an issue.
When I run it through context it works and produces output that uses the EBGaramond font. The following also work: antykwapoltawskiego, asana, cambria, charter, ebgaramond, gentium, inconsolata, iwona, kurier, lato, punknova, stix, and xits. But other things, like palatino and pagella and dejavu. Those end up using Latin Modern Roman.
Latin Modern Roman is the default font family for serif typeface.
I realize I don't understand ConTeXt's font handling and typescripts very well, could someone explain why some of those things work, and others don't?
ConTeXt doesn’t recognize the invoked typeface and uses the default one.
I'll note that pandoc generates this because it lets users of pandoc specify different fonts for the main body font, the math font, the sans font, and the mono font.
This is a bridge to use both LaTeX and ConTeXt capabilities to deal with the document typefaces.
Can anybody suggest a different way of doing that, which works more often or more simply?
I’ll try. But let us know whether something is not clear. My explanation seeks to be effective. It might be not 100% technically right. Others might correct my point of view. You have three main options in both \definefontfamily and \definefallbackfamily, which are the three pair of brackets. \definefontfamily[identifier][rm][TeX Gyre Pagella] The first option is the identifier, you may use whichever you want, but the same should be used defining the same typeface family (fallback typefaces) and in \setupbodyfont (\switchtobodyfont is irrelevant for pandoc, as far as I know). The second option is the typeface class of the family: serif, sans-serif, math, mono. The last one is the typeface name. I would suggest that you stick to the font name as displayed by the font in your operative system. So, TeX Gyre Pagella is the typeface for what ConTeXt defines as palatino and pagella. DejaVu Serif (and many others) is the serif typeface for the dejavu identifier. My personal approach to font handling in ConTeXt (which Wolfgang can correct) is the following: * If you use \definefontfamily, use the full font name in the font selection option (third pair of brackets). * Otherwise, use the font identifier (I guess this comes from a typescript) with only \setupbodyfont (or \switchtobodyfont). I hope it helps, Pablo -- http://www.ousia.tk
On 12/6/2020 6:24 PM, Pablo Rodriguez wrote:
On 12/6/20 1:03 PM, T. Kurt Bond wrote:
backend > blocked > function 'setmapfile' is not accessible
Using LMTX, it seems to be "Latin Modern Roman Math".
I wonder whether this is an intended new feature or an issue.
hm, seems like something is loading a map file ... i'll make that calla dummy (context doesn't need map files so i removed left-overs in lmtx) 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 -----------------------------------------------------------------
I think that what confused me the most is that "\setupbodyfont[pagella]"
works fine, but "\definefontfamily[mainface][rm][pagella]" does not.
On Sun, Dec 6, 2020 at 7:03 AM T. Kurt Bond
I've got a small ConTeXt source file, that is a minimization of a file generated by the the ConTeXt output of pandoc using pandoc features to set the main font to ebgaramond:
\definefallbackfamily[mainface][rm][CMU Serif][preset=range:greek, force=yes] \definefontfamily[mainface][rm][ebgaramond] \definefontfamily[mainface][mm][Latin Modern Math] \definefontfamily[mainface][ss][Latin Modern Sans] \definefontfamily[mainface][tt][Latin Modern Typewriter][features=none] \setupbodyfont[mainface]
\starttext
Is this text in Pagella?
\stoptext
When I run it through context it works and produces output that uses the EBGaramond font. The following also work: antykwapoltawskiego, asana, cambria, charter, ebgaramond, gentium, inconsolata, iwona, kurier, lato, punknova, stix, and xits. But other things, like palatino and pagella and dejavu. Those end up using Latin Modern Roman.
I realize I don't understand ConTeXt's font handling and typescripts very well, could someone explain why some of those things work, and others don't?
I'll note that pandoc generates this because it lets users of pandoc specify different fonts for the main body font, the math font, the sans font, and the mono font.
Can anybody suggest a different way of doing that, which works more often or more simply? -- T. Kurt Bond, tkurtbond@gmail.com, https://tkurtbond.github.io
-- T. Kurt Bond, tkurtbond@gmail.com, https://tkurtbond.github.io
On 12/8/20 10:13 AM, T. Kurt Bond wrote:
I think that what confused me the most is that "\setupbodyfont[pagella]" works fine, but "\definefontfamily[mainface][rm][pagella]" does not.
But is it clear now that identifiers and typeface names (such as explained in my previous message) are totally different? Pablo -- http://www.ousia.tk
Yes, it is. Thank you for the clarification.
On Tue, Dec 8, 2020 at 4:39 AM Pablo Rodriguez
On 12/8/20 10:13 AM, T. Kurt Bond wrote:
I think that what confused me the most is that "\setupbodyfont[pagella]" works fine, but "\definefontfamily[mainface][rm][pagella]" does not.
But is it clear now that identifiers and typeface names (such as explained in my previous message) are totally different?
Pablo -- http://www.ousia.tk
___________________________________________________________________________________ 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
___________________________________________________________________________________
-- T. Kurt Bond, tkurtbond@gmail.com, https://tkurtbond.github.io
participants (3)
-
Hans Hagen
-
Pablo Rodriguez
-
T. Kurt Bond