[NTG-context] Selecting fonts using the built-in simplefonts module
joerg73.muc at googlemail.com
Sun Mar 29 22:29:04 CEST 2015
On 29.03.2015 21:31, Wolfgang Schuster wrote:
>> Am 29.03.2015 um 20:33 schrieb Jörg Weger <joerg73.muc at googlemail.com
>> <mailto:joerg73.muc at googlemail.com>>:
>>> You need the familyname of the font, you use the font manager of your OS
>>> to get the name.
>>> \definefontfamily [junction] [rm] [Junction]
>>> \definefontfamily [junction] [mm] [Latin Modern Math]
>>> \definefontfamily [junction-light] [rm] [Junction]
>> I just had it made working this way:
>> [tf=Junction Light, bf=Junction Regular]
> \definefontfamily [mainface] [ss] [Junction] [tf=* Light,bf=* Regular]
>> It seems that as soon as you define your own weights (which you can
>> mix from different font families) in the fourth pair of brackets,
>> there can be anything in the third pair of brackets (family name).
>> [regularfont=Junction Light, boldfont=Junction Regular]
>> works as well and is more self-explaining.
> This will only work when you set a upright font or you will get problems.
What problems do you mean?
The following seems to work, only that there is a fallback to the fonts
defined as upright fonts (which are in fact italic fonts) for the \em
parts which seems to be the default behaviour if no italic fonts are
defined in the fourth bracket pair:
%%% MWE %%%%%%%%%%%%%%%%%%%%
Light Italic, bf=Roboto Black Italic]
\ss \input lorem
\ss \bf \input lorem
\ss \tf \em \input lorem
\ss \bf \em \input lorem
%%%%%%%%%% End of MWE %%%%%%%%%
Of course these font definitions do not make much sense but they work as
I had expected from previous observations. And of course you should
define all styles (\rm, \ss, \mm).
>> An advantage of your way
>> > \definefontfamily [junction-light] [rm] [Junction]
>> > [tf=style:light,bf=style:regular]
>> is that you have to type the family name only once if you re-define
>> weights from the same family.
> When you use the keywords for the style you don’t have to look for the
> right names and simpelfonts has fallbacks when the requested style isn’t
That is a nice option.
>> Are there any reasons why one should not use any of all those synonyms?
> What do you mean?
I mean that for example inside the second bracket pair “rm” equals
“serif”, ”ss“ equals “sans” etc., in the fourth bracket pair
“regularfont” equals “tf” etc.
Are there recommendations to not use some of those apart from personal
taste? Or is “rm” simply a shorter plain TeX heritage while “serif” is
> If your question is of interest to others as well, please add an entry to the Wiki!
> maillist : ntg-context at 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
More information about the ntg-context