Your mistake was that you did not use the correct font family name in
the third pair of square brackets. It is simply “Junction”.
I have yet to find out if ConTeXt itself can show a font’s true family name.
On Linux I am either using a command line tool called otfinfo (that
also shows me what opentype features are there) or I open the font with
fontforge (if I want to find out more about the details of opentype
features) or I open it with mate-font-viewer (fork of
gnome-font-viewer). In the latter the family name is shown in the first
line on the right.
Name: Junction
What desktop environment are you using?
As far as I have understood by default the built in font-selection
module uses the “family members” named “Regular” and “Bold” of a
selected font family, e.g. in
\definefontfamily[mainface][ss][Junction]
\ss gives Junction Regular and \ss \bf gives Junction Bold
If you want to use different font weights you have to define them
yourself in a fourth pair of square brackets.
The League of Movable Type’s Junction font family offers three weights:
Light, Regular and Bold.
Assuming that you want to use Junction Light as your “regular sans
serif” font and Junction Regular as your “bold sans serif” you define
for sans serif:
\definefontfamily[mainface][ss][Junction]
[regularfont=Junction Light, boldfont=Junction Regular]
Now \ss should give Junction Light and \ss \bf should give Junction Regular.
You can define italics as well, as the following definition for Google’s
Roboto shows where I am using light and black instead of regular and
bold. (Junction does not offer italic or slanted, that is why I use
Roboto as an example of a family with many weights and styles.
https://developer.android.com/design/style/typography.html should have
the reworked 2014 version for download.)
\definefontfamily[mainface][ss][Roboto]
[regularfont=Roboto Light, italicfont=Roboto Light Italic,
boldfont=Roboto Black, bolditalicfont=Roboto Black Italic]
(You could even mix weights and styles from different font families.)
Hope that helps.
Greetings Jörg
On 29.03.2015 14:40, 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/).
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]'
The use of 'Junction Light' doesn't work, and neither does
'Junction-Light', nor 'junctionlight', nor even 'Junction, Light'
which I retrieve from Font Viewer under Linux. MWE follows at the
end of this email. I reference Wolfgang's response stating that the
expanded name must be used
(http://www.ntg.nl/pipermail/ntg-context/2014/077321.html).
$ mtxrun --script fonts --list --all --pattern=junction
resolvers | trees | analyzing 'home:texmf'
resolvers | caching | skipping 'files' for 'home:texmf' from
'/opt/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/54be04d87dd160089f572b19cb5c97e9'
(version mismatch)
junction junctionbold
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/junction-master/Junction-bold.otf
junctionbold junctionbold
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/junction-master/Junction-bold.otf
junctionlight junctionlight
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/junction-master/Junction-light.otf
junctionregular junctionregular
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/junction-master/Junction-regular.otf
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..
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?
Or how the League Gothic font is processed below. How is it that
leaguegothic is mapped to leaguegothiccondenseditalic by default?
What is the recommended way in this new simplefont scheme to set the
mappings for a document?
$ mtxrun --script fonts --list --all --pattern=leaguegothic
resolvers | trees | analyzing 'home:texmf'
resolvers | caching | skipping 'files' for 'home:texmf' from
'/opt/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/54be04d87dd160089f572b19cb5c97e9'
(version mismatch)
leaguegothic leaguegothiccondenseditalic
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/theleagueof-league-gothic-64c3ede/LeagueGothic-CondensedItalic.otf
leaguegothiccondenseditalic leaguegothiccondenseditalic
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/theleagueof-league-gothic-64c3ede/LeagueGothic-CondensedItalic.otf
leaguegothiccondensedregular leaguegothiccondensedregular
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/theleagueof-league-gothic-64c3ede/LeagueGothic-CondensedRegular.otf
leaguegothicitalic leaguegothicitalic
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/theleagueof-league-gothic-64c3ede/LeagueGothic-Italic.otf
leaguegothicregular leaguegothicregular
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/theleagueof-league-gothic-64c3ede/LeagueGothic-Regular.otf
Many thanks.
MWE
\definefontfamily[mainface][rm][Prociono]
\definefontfamily[mainface][ss][Junction Light]
%\definefontfamily[mainface][ss][junctionlight]
%\definefontfamily[mainface][ss][Junction-Light]
%\definefontfamily[mainface][ss][Junction, Light]
\definefontfamily[mainface][mm][TeX Gyre Pagella Math]
\setupbodyfont[mainface,9pt]
\setupwhitespace[medium]
\starttext
\input lorem
\ss\input lorem
% {\simplefont[heydingsicons] q}~123.456.7890
\stoptext
<<<<
___________________________________________________________________________________
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
___________________________________________________________________________________