[NTG-context] Selecting fonts using the built-in simplefonts module

Pablo Rodriguez oinos at gmx.es
Sun Mar 29 18:37:50 CEST 2015


On 03/29/2015 02:40 PM, Pavneet Arora wrote:
> Hello everyone,
> 
> After a long time I have some typesetting work in front of me...yippeee!
> 
> I am struggling with adapting my templates to the new integrated 
> simplefonts module, and hope that someone can help.
> 
> The three issues I am having are:
> 
> 1.  How does one find the proper expanded long name of the desired font.  
>     For this project, I am using some fonts from The League of Moveable 
>     Type (https://www.theleagueofmoveabletype.com/).

Hi Pavneet,

the long name should be displayed in any GUI application from your OS.

inkscape should to the work here (I warmly recommend version 0.91).

>     I have reloaded the fonts, and can list them, in the traditional 
>     manner.  What I don't know is how to find the proper name for---say 
>     Junction Light---to use as the third argument in 
>     '\definefontfamily[mainface][ss][Junction Light]'

I have just downloaded and installed the OTF version from
https://www.theleagueofmoveabletype.com/junction.

I don’t make it work either. I suspect this due to crappy font naming.

> 2.  How does one switch fonts in-line for small snippets of text?  I 
>     used to use '{\simplefont[heydingsicons] q}123.345.67890', but this 
>     now results in an error.
> 
>     tex error       > error on line 7 in file virtual://buffer.noname.1: ! Undefined control sequence
> 
>     l.7                 {\simplefont [heydingsicons] q}~123.456.7890 {\simplefont[heydingsicons..

You have to load in the preamble:

   \usemodule[simplefonts]

This is required to use the \simplefont command.

But with the new interface you should use:

   \definefontfamily[heydingsicons][rm][Humeur]

And then, in text:

   {\switchtobodyfont[heydingsicons] q}~123.456.7890

> 3.  This may be a more generic typescript mapping issue, but I still 
>     struggle with understanding font mappings.  I don't quite get how 
>     the default mappings are done.
> 
>     Look, for example, at Junction above.  'junction' is mapped to 
>     'junctionbold' rather than 'junctionregular'.  Is this just done by 
>     taking the first in the list in alphabetic order?

The problem is wrong font naming.

>>>>> MWE

This should work better (ss font doesn’t work):

    \definefontfamily[mainface][rm][Prociono]
    \definefontfamily[mainface][ss][Junction-Light]
    \definefontfamily[mainface][mm][TeX Gyre Pagella Math]
    \definefontfamily[heydingsicons][rm][Humeur]
    \setupbodyfont[mainface,9pt]

    \setupwhitespace[medium]

    \starttext
        \input lorem

        \ss\input lorem

    {\switchtobodyfont[heydingsicons] q}~123.456.7890
    \stoptext

Just in case it helps,


Pablo
-- 
http://www.ousia.tk


More information about the ntg-context mailing list