ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Confusion with fonts
@ 2020-12-06 12:03 T. Kurt Bond
  2020-12-06 17:24 ` Pablo Rodriguez
  2020-12-08  9:13 ` T. Kurt Bond
  0 siblings, 2 replies; 6+ messages in thread
From: T. Kurt Bond @ 2020-12-06 12:03 UTC (permalink / raw)
  To: context mailing list


[-- Attachment #1.1: Type: text/plain, Size: 1365 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 2368 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Confusion with fonts
  2020-12-06 12:03 Confusion with fonts T. Kurt Bond
@ 2020-12-06 17:24 ` Pablo Rodriguez
  2020-12-07  1:06   ` Hans Hagen
  2020-12-08  9:13 ` T. Kurt Bond
  1 sibling, 1 reply; 6+ messages in thread
From: Pablo Rodriguez @ 2020-12-06 17:24 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Confusion with fonts
  2020-12-06 17:24 ` Pablo Rodriguez
@ 2020-12-07  1:06   ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2020-12-07  1:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Pablo Rodriguez

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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Confusion with fonts
  2020-12-06 12:03 Confusion with fonts T. Kurt Bond
  2020-12-06 17:24 ` Pablo Rodriguez
@ 2020-12-08  9:13 ` T. Kurt Bond
  2020-12-08  9:35   ` Pablo Rodriguez
  1 sibling, 1 reply; 6+ messages in thread
From: T. Kurt Bond @ 2020-12-08  9:13 UTC (permalink / raw)
  To: context mailing list


[-- Attachment #1.1: Type: text/plain, Size: 1715 bytes --]

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 <tkurtbond@gmail.com> wrote:

> 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

[-- Attachment #1.2: Type: text/html, Size: 3329 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Confusion with fonts
  2020-12-08  9:13 ` T. Kurt Bond
@ 2020-12-08  9:35   ` Pablo Rodriguez
  2020-12-08 10:35     ` T. Kurt Bond
  0 siblings, 1 reply; 6+ messages in thread
From: Pablo Rodriguez @ 2020-12-08  9:35 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Confusion with fonts
  2020-12-08  9:35   ` Pablo Rodriguez
@ 2020-12-08 10:35     ` T. Kurt Bond
  0 siblings, 0 replies; 6+ messages in thread
From: T. Kurt Bond @ 2020-12-08 10:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1062 bytes --]

Yes, it is.  Thank you for the clarification.

On Tue, Dec 8, 2020 at 4:39 AM Pablo Rodriguez <oinos@gmx.es> wrote:

> 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

[-- Attachment #1.2: Type: text/html, Size: 2204 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-12-08 10:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-06 12:03 Confusion with fonts T. Kurt Bond
2020-12-06 17:24 ` Pablo Rodriguez
2020-12-07  1:06   ` Hans Hagen
2020-12-08  9:13 ` T. Kurt Bond
2020-12-08  9:35   ` Pablo Rodriguez
2020-12-08 10:35     ` T. Kurt Bond

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).