ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* odd behaviour with \definefontfamily
@ 2020-08-26  1:43 jbf
  2020-08-26  1:58 ` Aditya Mahajan
  0 siblings, 1 reply; 7+ messages in thread
From: jbf @ 2020-08-26  1:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Can someone tell me why, when I define my typefaces as follows below, I get:

mkiv lua stats  > loaded fonts: 2 files: baskervaldadfstd.otf, 
texgyrepagella-math.otf

when in fact my font definitions are:

\definefontfamily [mainface] [rm] [baskervaldadfstd] 
[tf=file:BaskervaldADFStd.otf]
\definefontfamily [mainface] [ss] [librisadfstd] 
[tf=file:LibrisADFStd-Regular.otf]
\definefontfamily [mainface] [mm] [TeX Gyre Pagella Math]

\setupbodyfont[mainface]

---------------------

ConTeXt loads the [rm] and the [mm] but not the [ss]. Be assured that 
the ss typeface is available. So if, for example, I comment out the 
first line ([rm]) and change the Libris to rm instead, I am told:

mkiv lua stats  > loaded fonts: 2 files: librisadfstd-regular.otf, 
texgyrepagella-math.otf

In other words, only two, not three definitions are working at any one 
time. Or is it not accepting [ss] for some reason regardless? I have 
tried any number of existing sans serif fonts and none of them will 
load. I know the family names are correct, so that is not the problem. 
What could I be doing wrong?

Julian

___________________________________________________________________________________
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] 7+ messages in thread

* Re: odd behaviour with \definefontfamily
  2020-08-26  1:43 odd behaviour with \definefontfamily jbf
@ 2020-08-26  1:58 ` Aditya Mahajan
  2020-08-26  2:27   ` jbf
  0 siblings, 1 reply; 7+ messages in thread
From: Aditya Mahajan @ 2020-08-26  1:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1428 bytes --]

On Wed, 26 Aug 2020, jbf wrote:

> Can someone tell me why, when I define my typefaces as follows below, I get:
> 
> mkiv lua stats  > loaded fonts: 2 files: baskervaldadfstd.otf, 
> texgyrepagella-math.otf
> 
> when in fact my font definitions are:
> 
> \definefontfamily [mainface] [rm] [baskervaldadfstd] 
> [tf=file:BaskervaldADFStd.otf]
> \definefontfamily [mainface] [ss] [librisadfstd] 
> [tf=file:LibrisADFStd-Regular.otf]
> \definefontfamily [mainface] [mm] [TeX Gyre Pagella Math]
> 
> \setupbodyfont[mainface]
> 
> ---------------------
> 
> ConTeXt loads the [rm] and the [mm] but not the [ss]. Be assured that 
> the ss typeface is available. So if, for example, I comment out the 
> first line ([rm]) and change the Libris to rm instead, I am told:
> 
> mkiv lua stats  > loaded fonts: 2 files: librisadfstd-regular.otf, 
> texgyrepagella-math.otf
> 
> In other words, only two, not three definitions are working at any one 
> time. Or is it not accepting [ss] for some reason regardless? I have 
> tried any number of existing sans serif fonts and none of them will 
> load. I know the family names are correct, so that is not the problem. 
> What could I be doing wrong?

Are you actually using sans serif text in your document? If not, then context has no reason to embed a subset of it in the PDF. It is the same reason by the teletype [tt] font has not been loaded.

Aditya

[-- 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] 7+ messages in thread

* Re: odd behaviour with \definefontfamily
  2020-08-26  1:58 ` Aditya Mahajan
@ 2020-08-26  2:27   ` jbf
  2020-08-26  3:18     ` Aditya Mahajan
  0 siblings, 1 reply; 7+ messages in thread
From: jbf @ 2020-08-26  2:27 UTC (permalink / raw)
  To: Aditya Mahajan; +Cc: mailing list for ConTeXt users


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

I intend to use it! So, yes, I had not used it at this point, and your 
explanation now makes sense.

In the test example I have, I have now placed a line:  \ss My text, and 
I see that it now loads the sans serif font. But can you explain why it 
loads the math font, given that I have not, as yet, used that anywhere 
(and may not - it is there for insurance in case such a glyph is needed)?

Julian

On 26/8/20 11:58 am, Aditya Mahajan wrote:
> On Wed, 26 Aug 2020, jbf wrote:
>
>> Can someone tell me why, when I define my typefaces as follows below, I get:
>>
>> mkiv lua stats  > loaded fonts: 2 files: baskervaldadfstd.otf,
>> texgyrepagella-math.otf
>>
>> when in fact my font definitions are:
>>
>> \definefontfamily [mainface] [rm] [baskervaldadfstd]
>> [tf=file:BaskervaldADFStd.otf]
>> \definefontfamily [mainface] [ss] [librisadfstd]
>> [tf=file:LibrisADFStd-Regular.otf]
>> \definefontfamily [mainface] [mm] [TeX Gyre Pagella Math]
>>
>> \setupbodyfont[mainface]
>>
>> ---------------------
>>
>> ConTeXt loads the [rm] and the [mm] but not the [ss]. Be assured that
>> the ss typeface is available. So if, for example, I comment out the
>> first line ([rm]) and change the Libris to rm instead, I am told:
>>
>> mkiv lua stats  > loaded fonts: 2 files: librisadfstd-regular.otf,
>> texgyrepagella-math.otf
>>
>> In other words, only two, not three definitions are working at any one
>> time. Or is it not accepting [ss] for some reason regardless? I have
>> tried any number of existing sans serif fonts and none of them will
>> load. I know the family names are correct, so that is not the problem.
>> What could I be doing wrong?
> Are you actually using sans serif text in your document? If not, then context has no reason to embed a subset of it in the PDF. It is the same reason by the teletype [tt] font has not been loaded.
>
> Aditya
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

[-- Attachment #1.2: Type: text/html, Size: 3574 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] 7+ messages in thread

* Re: odd behaviour with \definefontfamily
  2020-08-26  2:27   ` jbf
@ 2020-08-26  3:18     ` Aditya Mahajan
  2020-08-26  3:42       ` jbf
  0 siblings, 1 reply; 7+ messages in thread
From: Aditya Mahajan @ 2020-08-26  3:18 UTC (permalink / raw)
  To: jbf; +Cc: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 581 bytes --]


On Wed, 26 Aug 2020, jbf wrote:

> I intend to use it! So, yes, I had not used it at this point, and your
> explanation now makes sense.
> 
> In the test example I have, I have now placed a line:  \ss My text, and I see
> that it now loads the sans serif font. But can you explain why it loads the
> math font, given that I have not, as yet, used that anywhere (and may not - it
> is there for insurance in case such a glyph is needed)?

A complete minimal working example will help ... (some symbols, like the bullet in itemize is taken from the math font).

Aditya

[-- 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] 7+ messages in thread

* Re: odd behaviour with \definefontfamily
  2020-08-26  3:18     ` Aditya Mahajan
@ 2020-08-26  3:42       ` jbf
  2020-08-26  4:20         ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: jbf @ 2020-08-26  3:42 UTC (permalink / raw)
  To: Aditya Mahajan; +Cc: mailing list for ConTeXt users


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

MWE as follows:

\definefontfamily [mainface] [rm] [baskervaldadfstd] 
[tf=file:BaskervaldADFStd.otf]
\definefontfamily [mainface] [ss] [librisadfstd] 
[tf=file:LibrisADFStd-Regular.otf]
\definefontfamily [mainface] [mm] [TeX Gyre Pagella Math]

\setupbodyfont[mainface]

\starttext
\tf ffi,

\it ffi,

\bf ffi,

\bi ffi.

\ss THIS IS A TITLE IN SANS SERIF

\tt Monospaced

\stoptext

Context then tells me that:

/mkiv lua stats  > loaded fonts: 6 files: baskervaldadfstd-bold.otf, 
baskervaldadfstd-bolditalic.otf, baskervaldadfstd-italic.otf, 
baskervaldadfstd.otf, librisadfstd-bolditalic.otf, texgyrepagella-math.otf/

So, in this instance, and as you explained would be the case, it is 
loading the sans serif family (Libris) but I note that it is not giving 
me what I asked for, which was /LibrisADFStd-Regular.otf/. Instead it 
has given me /LibrisADFStd-BoldItalic.otf/

And I deliberately did not include any maths, or itemize or anything 
that might involve those symbols, thinking it would not then load the 
Pagella Maths file, but it did. So my two questions now are

1. Why is it loading Libris BoldItalic and not Regular as asked for?

2. If I am not using Maths so far, why is it loading the Pagella math file?

Julian

On 26/8/20 1:18 pm, Aditya Mahajan wrote:
> On Wed, 26 Aug 2020, jbf wrote:
>
>> I intend to use it! So, yes, I had not used it at this point, and your
>> explanation now makes sense.
>>
>> In the test example I have, I have now placed a line:  \ss My text, and I see
>> that it now loads the sans serif font. But can you explain why it loads the
>> math font, given that I have not, as yet, used that anywhere (and may not - it
>> is there for insurance in case such a glyph is needed)?
> A complete minimal working example will help ... (some symbols, like the bullet in itemize is taken from the math font).
>
> Aditya

[-- Attachment #1.2: Type: text/html, Size: 2884 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] 7+ messages in thread

* Re: odd behaviour with \definefontfamily
  2020-08-26  3:42       ` jbf
@ 2020-08-26  4:20         ` Wolfgang Schuster
  2020-08-26  4:42           ` jbf
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2020-08-26  4:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

jbf schrieb am 26.08.2020 um 05:42:
> MWE as follows:
> 
> \definefontfamily [mainface] [rm] [baskervaldadfstd] 
> [tf=file:BaskervaldADFStd.otf]
> \definefontfamily [mainface] [ss] [librisadfstd] 
> [tf=file:LibrisADFStd-Regular.otf]
> \definefontfamily [mainface] [mm] [TeX Gyre Pagella Math]
> 
> \setupbodyfont[mainface]
> 
> \starttext
> \tf ffi,
> 
> \it ffi,
> 
> \bf ffi,
> 
> \bi ffi.
> 
> \ss THIS IS A TITLE IN SANS SERIF
> 
> \tt Monospaced
> 
> \stoptext
> 
> Context then tells me that:
> 
> /mkiv lua stats  > loaded fonts: 6 files: baskervaldadfstd-bold.otf, 
> baskervaldadfstd-bolditalic.otf, baskervaldadfstd-italic.otf, 
> baskervaldadfstd.otf, librisadfstd-bolditalic.otf, texgyrepagella-math.otf/
> 
> So, in this instance, and as you explained would be the case, it is 
> loading the sans serif family (Libris) but I note that it is not giving 
> me what I asked for, which was /LibrisADFStd-Regular.otf/. Instead it 
> has given me /LibrisADFStd-BoldItalic.otf/
> 
> And I deliberately did not include any maths, or itemize or anything 
> that might involve those symbols, thinking it would not then load the 
> Pagella Maths file, but it did. So my two questions now are
> 
> 1. Why is it loading Libris BoldItalic and not Regular as asked for?

You used \bi before you switched to the sans serif font and the style is 
still active. To prevent this problem add around around style changes, 
e.g. {\bi ...}.

> 2. If I am not using Maths so far, why is it loading the Pagella math file?

ConTeXt checks the math font when you change the font with 
\setupbodyfont and at this point the math font gets loaded.

You can prevent the loading of the math font with \textonly but you 
should use this only when you're 100% sure you never use math in your 
document. As Aditya already ConTeXt can use math for itemize symbols 
(which isn't the default behavior anymore) and it's better to keep math 
to avoid problems.

%% begin example
\textonly

\starttext
\unknown
\stoptext
%% end example

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: odd behaviour with \definefontfamily
  2020-08-26  4:20         ` Wolfgang Schuster
@ 2020-08-26  4:42           ` jbf
  0 siblings, 0 replies; 7+ messages in thread
From: jbf @ 2020-08-26  4:42 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

I get it now. Thanks to you both.

Julian

On 26/8/20 2:20 pm, Wolfgang Schuster wrote:
> jbf schrieb am 26.08.2020 um 05:42:
>> MWE as follows:
>>
>> \definefontfamily [mainface] [rm] [baskervaldadfstd] 
>> [tf=file:BaskervaldADFStd.otf]
>> \definefontfamily [mainface] [ss] [librisadfstd] 
>> [tf=file:LibrisADFStd-Regular.otf]
>> \definefontfamily [mainface] [mm] [TeX Gyre Pagella Math]
>>
>> \setupbodyfont[mainface]
>>
>> \starttext
>> \tf ffi,
>>
>> \it ffi,
>>
>> \bf ffi,
>>
>> \bi ffi.
>>
>> \ss THIS IS A TITLE IN SANS SERIF
>>
>> \tt Monospaced
>>
>> \stoptext
>>
>> Context then tells me that:
>>
>> /mkiv lua stats  > loaded fonts: 6 files: baskervaldadfstd-bold.otf, 
>> baskervaldadfstd-bolditalic.otf, baskervaldadfstd-italic.otf, 
>> baskervaldadfstd.otf, librisadfstd-bolditalic.otf, 
>> texgyrepagella-math.otf/
>>
>> So, in this instance, and as you explained would be the case, it is 
>> loading the sans serif family (Libris) but I note that it is not 
>> giving me what I asked for, which was /LibrisADFStd-Regular.otf/. 
>> Instead it has given me /LibrisADFStd-BoldItalic.otf/
>>
>> And I deliberately did not include any maths, or itemize or anything 
>> that might involve those symbols, thinking it would not then load the 
>> Pagella Maths file, but it did. So my two questions now are
>>
>> 1. Why is it loading Libris BoldItalic and not Regular as asked for?
>
> You used \bi before you switched to the sans serif font and the style 
> is still active. To prevent this problem add around around style 
> changes, e.g. {\bi ...}.
>
>> 2. If I am not using Maths so far, why is it loading the Pagella math 
>> file?
>
> ConTeXt checks the math font when you change the font with 
> \setupbodyfont and at this point the math font gets loaded.
>
> You can prevent the loading of the math font with \textonly but you 
> should use this only when you're 100% sure you never use math in your 
> document. As Aditya already ConTeXt can use math for itemize symbols 
> (which isn't the default behavior anymore) and it's better to keep 
> math to avoid problems.
>
> %% begin example
> \textonly
>
> \starttext
> \unknown
> \stoptext
> %% end example
>
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________ 
>
___________________________________________________________________________________
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] 7+ messages in thread

end of thread, other threads:[~2020-08-26  4:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-26  1:43 odd behaviour with \definefontfamily jbf
2020-08-26  1:58 ` Aditya Mahajan
2020-08-26  2:27   ` jbf
2020-08-26  3:18     ` Aditya Mahajan
2020-08-26  3:42       ` jbf
2020-08-26  4:20         ` Wolfgang Schuster
2020-08-26  4:42           ` jbf

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).