ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Font fallback
@ 2018-12-03 18:22 Hans Åberg
  2018-12-03 18:35 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Åberg @ 2018-12-03 18:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I can't get create a font fallback in the the example below, so some input is welcome. It works when using STIX2 only (the commented out part), but somehow the font name is not recognized in the fallback, not when using what is listed by 'mtxrun --script fonts --list --all'.

—
\definefontfamily[stix-two][mono][Stix Two Text]
\definefontfamily[stix-two][math][Stix Two Math]

%\setupbodyfont[stix-two,10pt]

\definefallbackfamily [mainface] [rm] [Stix Two Text] [range={02070,0208F}]
\definefallbackfamily [mainface] [serif] [Stix Two Text] [range={02070,0208F}]
\definefallbackfamily [mainface] [mono] [Stix Two Text] [range={02070,0208F}]
\definefallbackfamily [mainface] [math] [Stix Two Math] [range={02070,0208F}]
\definefontfamily     [mainface] [rm] [stix]
\definefontfamily     [mainface] [math] [stix]
\definefontfamily     [mainface] [mono] [stix]

\setupbodyfont        [mainface]

\starttext

\startformula
 \startalign
  \NC 𝑨₀ 0  ₁ 1  ₂ 2  ₃ 3  ₄ 4  ₅ 5  ₆ 6  ₇ 7  ₈ 8  ₉ 9  ₊ +  ₋ -  ₌ =  ₍ (  ₎ )\NR
  \NC 𝑩⁰ 0  ¹ 1  ² 2  ³ 3  ⁴ 4  ⁵ 5  ⁶ 6  ⁷ 7  ⁸ 8  ⁹ 9  ⁺ +  ⁻ -  ⁼ =  ⁽ (  ⁾ )\NR
 \stopalign
\stopformula


\starttyping
  𝑨₀ 0  ₁ 1  ₂ 2  ₃ 3  ₄ 4  ₅ 5  ₆ 6  ₇ 7  ₈ 8  ₉ 9  ₊ +  ₋ -  ₌ =  ₍ (  ₎ )
  𝑩⁰ 0  ¹ 1  ² 2  ³ 3  ⁴ 4  ⁵ 5  ⁶ 6  ⁷ 7  ⁸ 8  ⁹ 9  ⁺ +  ⁻ -  ⁼ =  ⁽ (  ⁾ )
\stoptyping

  𝑨₀ 0  ₁ 1  ₂ 2  ₃ 3  ₄ 4  ₅ 5  ₆ 6  ₇ 7  ₈ 8  ₉ 9  ₊ +  ₋ -  ₌ =  ₍ (  ₎ )

  𝑩⁰ 0  ¹ 1  ² 2  ³ 3  ⁴ 4  ⁵ 5  ⁶ 6  ⁷ 7  ⁸ 8  ⁹ 9  ⁺ +  ⁻ -  ⁼ =  ⁽ (  ⁾ )

\stoptext
—
___________________________________________________________________________________
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] 3+ messages in thread

* Re: Font fallback
  2018-12-03 18:22 Font fallback Hans Åberg
@ 2018-12-03 18:35 ` Wolfgang Schuster
  2018-12-03 19:58   ` Hans Åberg
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2018-12-03 18:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Hans Åberg

Hans Åberg schrieb am 03.12.18 um 19:22:
> I can't get create a font fallback in the the example below, so some input is welcome. It works when using STIX2 only (the commented out part), but somehow the font name is not recognized in the fallback, not when using what is listed by 'mtxrun --script fonts --list --all'.
> 
> —
> \definefontfamily[stix-two][mono][Stix Two Text]
> \definefontfamily[stix-two][math][Stix Two Math]
> 
> %\setupbodyfont[stix-two,10pt]
> 
> \definefallbackfamily [mainface] [rm] [Stix Two Text] [range={02070,0208F}]
> \definefallbackfamily [mainface] [serif] [Stix Two Text] [range={02070,0208F}]

1. You’re creating the same fallback two times because rm=serif.

2. To pass a range use “-” as separator.

\definefallbackfamily [mainface] [serif] [Stix Two Text] 
[range={02070-0208F}]

> \definefallbackfamily [mainface] [mono] [Stix Two Text] [range={02070,0208F}]
> \definefallbackfamily [mainface] [math] [Stix Two Math] [range={02070,0208F}]
> \definefontfamily     [mainface] [rm] [stix]
> \definefontfamily     [mainface] [math] [stix]
> \definefontfamily     [mainface] [mono] [stix]

Do you have the Stix font on your system?

On my system this isn’t the case but I can use the XITS fonts.

\definefontfamily     [mainface] [serif] [XITS]
\definefontfamily     [mainface] [math]  [XITS Math]

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

* Re: Font fallback
  2018-12-03 18:35 ` Wolfgang Schuster
@ 2018-12-03 19:58   ` Hans Åberg
  0 siblings, 0 replies; 3+ messages in thread
From: Hans Åberg @ 2018-12-03 19:58 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users


> On 3 Dec 2018, at 19:35, Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:
> 
> Hans Åberg schrieb am 03.12.18 um 19:22:
>> I can't get create a font fallback in the the example below, so some input is welcome. It works when using STIX2 only (the commented out part), but somehow the font name is not recognized in the fallback, not when using what is listed by 'mtxrun --script fonts --list --all'.
>> —
>> \definefontfamily[stix-two][mono][Stix Two Text]
>> \definefontfamily[stix-two][math][Stix Two Math]
>> %\setupbodyfont[stix-two,10pt]
>> \definefallbackfamily [mainface] [rm] [Stix Two Text] [range={02070,0208F}]
>> \definefallbackfamily [mainface] [serif] [Stix Two Text] [range={02070,0208F}]
> 
> 1. You’re creating the same fallback two times because rm=serif.

Thanks, I was sort of aware of that, but expected at least one to be valid. :-)

> 
> 2. To pass a range use “-” as separator.
> 
> \definefallbackfamily [mainface] [serif] [Stix Two Text] [range={02070-0208F}]

This was the issue. It works now.

>> \definefallbackfamily [mainface] [mono] [Stix Two Text] [range={02070,0208F}]
>> \definefallbackfamily [mainface] [math] [Stix Two Math] [range={02070,0208F}]
>> \definefontfamily     [mainface] [rm] [stix]
>> \definefontfamily     [mainface] [math] [stix]
>> \definefontfamily     [mainface] [mono] [stix]
> 
> Do you have the Stix font on your system?

Yes, both are in TeX Live 2018, but I have them on the system as well, and the mtxrun command above lists them.

> On my system this isn’t the case but I can use the XITS fonts.
> 
> \definefontfamily     [mainface] [serif] [XITS]
> \definefontfamily     [mainface] [math]  [XITS Math]

Is XITS still needed? It had some adaptations I think for OTF, but STIX has been developed since.


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

end of thread, other threads:[~2018-12-03 19:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-03 18:22 Font fallback Hans Åberg
2018-12-03 18:35 ` Wolfgang Schuster
2018-12-03 19:58   ` Hans Åberg

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