ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \definefallbackfamily issues
@ 2014-02-23 10:00 Pablo Rodriguez
  2014-02-23 18:26 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Rodriguez @ 2014-02-23 10:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Wolfgang,

sorry for asking about the \definefallbackfamily again, but I have the
impression that the more I use, the less I understand it.

Here is the sample:

\setuplanguage[en][patterns={en,agr,ru}]
\definefallbackfamily[mainface][serif][CMU Serif][preset={range:greek,
range:cyrillic}, it={DejaVu Serif-Italic, scale:0.935}]
\definefontfamily[mainface][serif][TeX Gyre Pagella]
\setupbodyfont[mainface,14pt]
\starttext
Mixing scripts.

В начале июля

Λόγος δέ ἐστι {\em φωνὴ σημαντική}.
\stoptext

I have three questions:

How can I define one fallback with more than one range preset? (I tried
many combinations, but none of them worked.)

I cannot get a different italic fallback font if the fallback typeface
specified in the third argument has an italic font. What am I doing
wrong here?

Is it possible to scale only the italic font in a fallback definition
and not whole typeface? (In some cases, the feature is extremely handy.)

Many thanks for your help,


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

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

* Re: \definefallbackfamily issues
  2014-02-23 10:00 \definefallbackfamily issues Pablo Rodriguez
@ 2014-02-23 18:26 ` Wolfgang Schuster
  2014-02-23 20:55   ` Pablo Rodriguez
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2014-02-23 18:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 23.02.2014 um 11:00 schrieb Pablo Rodriguez <oinos@gmx.es>:

> Hi Wolfgang,
> 
> sorry for asking about the \definefallbackfamily again, but I have the
> impression that the more I use, the less I understand it.
> 
> Here is the sample:
> 
> \setuplanguage[en][patterns={en,agr,ru}]
> \definefallbackfamily[mainface][serif][CMU Serif][preset={range:greek,
> range:cyrillic}, it={DejaVu Serif-Italic, scale:0.935}]
> \definefontfamily[mainface][serif][TeX Gyre Pagella]
> \setupbodyfont[mainface,14pt]
> \starttext
> Mixing scripts.
> 
> В начале июля
> 
> Λόγος δέ ἐστι {\em φωνὴ σημαντική}.
> \stoptext
> 
> I have three questions:
> 
> How can I define one fallback with more than one range preset? (I tried
> many combinations, but none of them worked.)

Your example above uses two presets and both are used, the problem is that both presets set a value for the range key and you end up with this setup:

  \definefallbackfamily[…][…][…][range=<range setup for greek>,range=<range setup for cyrillic>]

When you have now multiple settings for the same key only the last setting is used and all of the previous ones are ignored. What you can foo in this case
is to set either the range value by yourself or add multiple fallback setting where you load only one preset, e.g.

  \definefallbackfamily[…][…][…][preset=range:greek]
  \definefallbackfamily[…][…][…][preset=range:cyrillic]

> I cannot get a different italic fallback font if the fallback typeface
> specified in the third argument has an italic font. What am I doing
> wrong here?

The \em command uses the slanted alternative by default, to use italic for \em add this to your document:

  \setupbodyfontenvironment[default][em=italic]

> Is it possible to scale only the italic font in a fallback definition
> and not whole typeface? (In some cases, the feature is extremely handy.)

Not yet, I can add this feature but it will only work for fallback fonts and not for the normal fonts which are set with \definefontfamily.

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

* Re: \definefallbackfamily issues
  2014-02-23 18:26 ` Wolfgang Schuster
@ 2014-02-23 20:55   ` Pablo Rodriguez
  0 siblings, 0 replies; 3+ messages in thread
From: Pablo Rodriguez @ 2014-02-23 20:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 02/23/2014 07:26 PM, Wolfgang Schuster wrote:
> Am 23.02.2014 um 11:00 schrieb Pablo Rodriguez <oinos@gmx.es>:
>>
>> How can I define one fallback with more than one range preset? (I tried
>> many combinations, but none of them worked.)
> 
> Your example above uses two presets and both are used, the problem
> is that both presets set a value for the range key and you end up
> with this setup:
> 
>   \definefallbackfamily[…][…][…][range=<range setup for
>        greek>,range=<range setup for cyrillic>]
> 
> When you have now multiple settings for the same key only the last
> setting is used and all of the previous ones are ignored. What you can
> foo in this caseis to set either the range value by yourself or add
> multiple fallback setting where you load only one preset, e.g.
> 
>   \definefallbackfamily[…][…][…][preset=range:greek]
>   \definefallbackfamily[…][…][…][preset=range:cyrillic]

Many thanks for your reply and the explanation, Wolfgang.

Now it is clear to me what was wrong with my presets.

>> I cannot get a different italic fallback font if the fallback typeface
>> specified in the third argument has an italic font. What am I doing
>> wrong here?
> 
> The \em command uses the slanted alternative by default, to use
> italic for \em add this to your document:
> 
>   \setupbodyfontenvironment[default][em=italic]

My fault. And a very silly one. This is something I knew, but I didn’t
realize it was the missing piece in this context.

>> Is it possible to scale only the italic font in a fallback definition
>> and not whole typeface? (In some cases, the feature is extremely handy.)
> 
> Not yet, I can add this feature but it will only work for fallback
> fonts and not for the normal fonts which are set with \definefontfamily.

It would be great to have such a feature.

Many thanks for your help again,


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

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

end of thread, other threads:[~2014-02-23 20:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-23 10:00 \definefallbackfamily issues Pablo Rodriguez
2014-02-23 18:26 ` Wolfgang Schuster
2014-02-23 20:55   ` Pablo Rodriguez

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