Am 09.01.2014 um 12:01 schrieb Joshua Krämer <joshua.krae...@gmail.com>:

> Thanks for your hard work!  I have a few additional questions regarding 
> the new system and font fallbacks.
> 
> 
> (1) How can I replace the hyphen automatically inserted at linebreaks?  
> If I use the following, only manually inserted hyphens are replaced:
> 
> \definefallbackfamily[mainface][serif][TeX Gyre Termes][range={0x0002d}]

Dunno, can you make this a separate question?

> (2) What effect does force=yes have?  It doesn't seem to make a 
> difference for me.

When you set “force=yes” (default value) context uses the fallback font even
when the character exists the main font.

> (3) I have a typeface that uses unusual style names: "roman1", "roman2", 
> "italic1", "italic2";  1 is regular, 2 is bold weight.  The following 
> works:
> 
> \definefontfamily[xxxface][serif][xxx][regularfont=xxxroman1, 
> italicfont=xxxitalic1, boldfont=xxxroman2]
> \setupbodyfont[xxxface]
> \starttext
> abc {\it abc} {\bf abc}
> \stoptext
> 
> This works for roman1 only:
> 
> \definefontfamily[xxxface][serif][xxx][regularfont=spec:roman1, 
> italicfont=spec:italic1, boldfont=spec:roman2]
> 
> Even this works for roman1 only:
> 
> \definefontfamily[xxxface][serif][xxx][regularfont=spec:roman1, 
> italicfont=xxxitalic1, boldfont=xxxroman2]

The name of the font files has nothing to do with way how \definefontfamily
collects the individual files for each style, to do this it uses internal names
and values from the font.

In a case where \definefontfamily can’t find all styles you can select them
with the name of the files:

\definefontfamily[<typeface>][<style>][<family 
name>][tf=file:uprightfont,it=file:italicfont,…]

> (4) Now I want to use this typeface for math fallback.  In the following 
> example, the upright glyphs are replaced, but not the italic glyphs:
> 
> \definefontfamily[xxxface][serif][xxx][regularfont=xxxroman1, 
> italicfont=xxxitalic1, boldfont=xxxroman2]
> \definefallbackfamily[xxxface][math][xxx][regularfont=xxxroman1, 
> preset=math:lowercasenormal]
> \definefallbackfamily[xxxface][math][xxx][regularfont=xxxroman1, 
> preset=math:uppercasenormal]
> \definefallbackfamily[xxxface][math][xxx][italicfont=xxxitalic1, 
> preset=math:lowercaseitalic]
> \definefallbackfamily[xxxface][math][xxx][italicfont=xxxitalic1, 
> preset=math:uppercaseitalic]
> \definefallbackfamily[xxxface][math][xxx][regularfont=xxxroman1, 
> preset=math:digitsnormal]
> \definefontfamily[xxxface][math][TeX Gyre Termes Math]
> \setupbodyfont[xxxface]
> \starttext
> $ \coprod \leftrightarrow ABC abc {\mathupright ABC abc} 123 $ 
> \stoptext


When you use a opentype math font the upright, italic, bold etc. characters
are all in the same file which uses only the regular style (a few math fonts
provide also a bold style which can be useful in headings).

Because there is only a upright math font you have to set a fallbacks
also for the upright style even when the font you’re using is italic, e.g.

\definefallbackfamily[xxxface][math][xxx][tf=file:xxxitalic1,preset=math:lowercaseitalic]

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
___________________________________________________________________________________

Reply via email to