ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* simplefonts: defining a fallback for a non-main font
@ 2013-11-14 21:52 Lars Huttar
  2013-11-14 22:06 ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Huttar @ 2013-11-14 21:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi again,

I'm using simplefonts (TeX Live 2013 version) and I have a main font:

\setmainfont[Gentium Book Basic]

and I can set a fallback for it,

\setmainfontfallback[Gentium Plus][range={ipaextensions}, force=yes,
rscale=auto]

and that works.


But then I have another font for the title:
\definesimplefont[titleface][Gentium Basic][size=40pt]


How do I set a fallback for it?

After looking at the source code for simplefonts, I tried:

% undefined cs: \definesimplefontfallback[titleface][Gentium
Plus][range={ipaextensions}, force=yes, rscale=auto]

% undefined cs: \fontfallback[titleface][Gentium
Plus][range={ipaextensions}, force=yes, rscale=auto]

% undefined cs: \definefallbackfont[titleface][Gentium
Plus][range={ipaextensions}, force=yes, rscale=auto]


But they all gave "undefined control sequence" errors.


I can work around the problem by setting the main font before the title,
using the main font for the title, and then changing the main font after
the title is done. But that seems kludgy.

Thanks,
Lars

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


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

* Re: simplefonts: defining a fallback for a non-main font
  2013-11-14 21:52 simplefonts: defining a fallback for a non-main font Lars Huttar
@ 2013-11-14 22:06 ` Wolfgang Schuster
  2013-11-14 22:10   ` Lars Huttar
  2013-11-15 14:48   ` Lars Huttar
  0 siblings, 2 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2013-11-14 22:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 14.11.2013 um 22:52 schrieb Lars Huttar <lars_huttar@sil.org>:

> Hi again,
> 
> I'm using simplefonts (TeX Live 2013 version) and I have a main font:
> 
> \setmainfont[Gentium Book Basic]
> 
> and I can set a fallback for it,
> 
> \setmainfontfallback[Gentium Plus][range={ipaextensions}, force=yes,
> rscale=auto]
> 
> and that works.
> 
> 
> But then I have another font for the title:
> \definesimplefont[titleface][Gentium Basic][size=40pt]
> 
> 
> How do I set a fallback for it?
> 
> After looking at the source code for simplefonts, I tried:
> 
> % undefined cs: \definesimplefontfallback[titleface][Gentium
> Plus][range={ipaextensions}, force=yes, rscale=auto]
> 
> % undefined cs: \fontfallback[titleface][Gentium
> Plus][range={ipaextensions}, force=yes, rscale=auto]
> 
> % undefined cs: \definefallbackfont[titleface][Gentium
> Plus][range={ipaextensions}, force=yes, rscale=auto]
> 
> 
> But they all gave "undefined control sequence" errors.
> 
> 
> I can work around the problem by setting the main font before the title,
> using the main font for the title, and then changing the main font after
> the title is done. But that seems kludgy.

There is no support for this with the old version of the module.

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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: simplefonts: defining a fallback for a non-main font
  2013-11-14 22:06 ` Wolfgang Schuster
@ 2013-11-14 22:10   ` Lars Huttar
  2013-11-15 14:48   ` Lars Huttar
  1 sibling, 0 replies; 6+ messages in thread
From: Lars Huttar @ 2013-11-14 22:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 11/14/2013 5:06 PM, Wolfgang Schuster wrote:
> There is no support for this with the old version of the module.
>

OK, good to know. Thanks.
Lars

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


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

* Re: simplefonts: defining a fallback for a non-main font
  2013-11-14 22:06 ` Wolfgang Schuster
  2013-11-14 22:10   ` Lars Huttar
@ 2013-11-15 14:48   ` Lars Huttar
  2013-11-15 16:50     ` Aditya Mahajan
  1 sibling, 1 reply; 6+ messages in thread
From: Lars Huttar @ 2013-11-15 14:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 11/14/2013 5:06 PM, Wolfgang Schuster wrote:
> Am 14.11.2013 um 22:52 schrieb Lars Huttar <lars_huttar@sil.org>:
>
>> ... But then I have another font for the title:
>> \definesimplefont[titleface][Gentium Basic][size=40pt]
>>
>>
>> How do I set a fallback for it?
>> ...
> There is no support for this with the old version of the module.
>

For posterity, here is how I worked around it:

\usemodule[simplefonts]

% The main font for text:
\setmainfont[Gentium Book Basic]

\setmainfontfallback[Gentium Plus][range={ipaextensions}, force=yes,
rscale=auto]

% The font for the title:
\def\titlefont{Gentium Basic}

\starttext

% Temporarily change the main font, while keeping the main font fallback:
{ \setmainfont[\titlefont] \switchtobodyfont[40pt] Title with a fancy
ɠlyph }


% Back to our previously defined main font:

Body text ...

\stoptext


Lars

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

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

* Re: simplefonts: defining a fallback for a non-main font
  2013-11-15 14:48   ` Lars Huttar
@ 2013-11-15 16:50     ` Aditya Mahajan
  2013-11-15 19:30       ` Lars Huttar
  0 siblings, 1 reply; 6+ messages in thread
From: Aditya Mahajan @ 2013-11-15 16:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 356 bytes --]

Just a minor improvement:

On Fri, 15 Nov 2013, Lars Huttar wrote:

> % Temporarily change the main font, while keeping the main font fallback:
> { \setmainfont[\titlefont] \switchtobodyfont[40pt] Title with a fancy
> ɠlyph }

Make that {\setmainfont[...] ... \endgraf}

Otherwise, the interline space will not be calculated correctly.

Aditya

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: simplefonts: defining a fallback for a non-main font
  2013-11-15 16:50     ` Aditya Mahajan
@ 2013-11-15 19:30       ` Lars Huttar
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Huttar @ 2013-11-15 19:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 11/15/2013 11:50 AM, Aditya Mahajan wrote:
> Just a minor improvement:
>
> On Fri, 15 Nov 2013, Lars Huttar wrote:
>
>> % Temporarily change the main font, while keeping the main font
>> fallback:
>> { \setmainfont[\titlefont] \switchtobodyfont[40pt] Title with a fancy
>> ɠlyph }
>
> Make that {\setmainfont[...] ... \endgraf}
>
> Otherwise, the interline space will not be calculated correctly.

Thanks. It actually didn't seem to make any difference, but I put it in.

Lars

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

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

end of thread, other threads:[~2013-11-15 19:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-14 21:52 simplefonts: defining a fallback for a non-main font Lars Huttar
2013-11-14 22:06 ` Wolfgang Schuster
2013-11-14 22:10   ` Lars Huttar
2013-11-15 14:48   ` Lars Huttar
2013-11-15 16:50     ` Aditya Mahajan
2013-11-15 19:30       ` Lars Huttar

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