Re: [NTG-context] Selecting fonts using the built-in simplefonts module
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 errorerror 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
Re: [NTG-context] Selecting fonts using the built-in simplefonts module
On 03/29/2015 05:56 PM, Jörg Weger wrote: Your mistake was that you did not use the correct font family name in the third pair of square brackets. It is simply “Junction”. Hi Jörg, this loads Junction Regular, but not Junction Light. 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. This works, but the name of the font in the third pair of brackets is fully irrelevant. This works too: \definefontfamily[mainface][ss][FarinUrlaub] [tf=Junction Light, bf=Junction Bold] I’m afraid these fonts are wrong named. 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 ___
Re: [NTG-context] Selecting fonts using the built-in simplefonts module
On 29.03.2015 19:47, Wolfgang Schuster wrote: Am 29.03.2015 um 14:40 schrieb Pavneet Arora pavneet_ar...@waroc.com mailto:pavneet_ar...@waroc.com: 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). 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] [tf=style:light,bf=style:regular] I just had it made working this way: \definefontfamily[mainface] [ss] [EgalobhierFarinUrlaubodersonstwasoderwersteht] [tf=Junction Light, bf=Junction 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). \definefontfamily[mainface] [sans] [Anything] [regularfont=Junction Light, boldfont=Junction Regular] works as well and is more self-explaining. 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. Are there any reasons why one should not use any of all those synonyms? Greetings Jörg \definefontfamily [junction-light] [mm] [Latin Modern Math] \setupbodyfont[junction] \starttext \input ward \bf \input ward \blank \switchtobodyfont[junction-light] \tf \input ward \bf \input ward \stoptext 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 errorerror on line 7 in file virtual://buffer.noname.1: ! Undefined control sequence l.7 {\simplefont [heydingsicons] q}~123.456.7890 {\simplefont[heydingsicons.. When you use a symbol font define a command for it with \definesymbol and access it with \symbol. The example below uses the Font Awesome [1] font for the symbols (the symbols are defined in the attached file). \usesymbols[fontawesome] \defineframed [SymbolFrame] [strut=no, width=1em, height=1em, background=color, backgroundcolor=black, corner=round, radius=.5ex, foregroundcolor=white] \definesymbol [mysymbol] [\SymbolFrame{\directsymbol{fontawesome}{question}}] \starttext \startlines \symbol[fontawesome][question] \symbol[fontawesome][question-circle] \framed[strut=no,width=1em,height=1em,background=color,backgroundcolor=black,corner=round,radius=.5ex,foregroundcolor=white]{\symbol[fontawesome][question]} \symbol[mysymbol] \stoplines \stoptext 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 leaguegothiccondenseditalicleaguegothiccondenseditalic
Re: [NTG-context] Selecting fonts using the built-in simplefonts module
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 errorerror 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 ___ 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 ___
Re: [NTG-context] Selecting fonts using the built-in simplefonts module
Am 29.03.2015 um 14:40 schrieb Pavneet Arora pavneet_ar...@waroc.com: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).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] [tf=style:light,bf=style:regular]\definefontfamily [junction-light] [mm] [Latin Modern Math]\setupbodyfont[junction]\starttext\input ward \bf \input ward\blank \switchtobodyfont[junction-light]\tf \input ward \bf \input ward\stoptext2. 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..When you use a symbol font define a command for it with \definesymbol and access it with \symbol.The example below uses the Font Awesome [1] font for the symbols (the symbols are defined in the attached file).\usesymbols[fontawesome]\defineframed [SymbolFrame] [strut=no, width=1em, height=1em, background=""> backgroundcolor=black, corner=round, radius=.5ex, foregroundcolor=white]\definesymbol [mysymbol] [\SymbolFrame{\directsymbol{fontawesome}{question}}]\starttext\startlines\symbol[fontawesome][question]\symbol[fontawesome][question-circle]\framed[strut=no,width=1em,height=1em,background="">\symbol[mysymbol]\stoplines\stoptext3. 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.otfThere mappings are only relevant when you create your own typescripts where you access fontswith the name method, e.g. \definefontsynonym [Serif] [name:leaguegothic] but simplefonts doesn’tuse of them.[1]http://fontawesome.ioWolfgang symb-fontawesome.mkiv Description: Binary data ___ 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 ___
Re: [NTG-context] Selecting fonts using the built-in simplefonts module
On 29.03.2015 21:31, Wolfgang Schuster wrote: Am 29.03.2015 um 20:33 schrieb Jörg Weger joerg73@googlemail.com mailto:joerg73@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] [tf=style:light,bf=style:regular] I just had it made working this way: \definefontfamily[mainface] [ss] [EgalobhierFarinUrlaubodersonstwasoderwersteht] [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). \definefontfamily[mainface] [sans] [Anything] [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 \definefontfamily[mainface][ss][EgalobhierFarinUrlaubodersonstwassteht][tf=Roboto Light Italic, bf=Roboto Black Italic] \setupbodyfont[mainface,9pt] \starttext \ss \input lorem \ss \bf \input lorem \ss \tf \em \input lorem \ss \bf \em \input lorem \stoptext %% 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 available. 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 more self-explaining? 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 ___ ___ 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 ___
Re: [NTG-context] Selecting fonts using the built-in simplefonts module
Dear Wolfgang, I am using: ConTeXt ver: 2015.03.28 22:37 MKIV beta fmt: 2015.3.29 int: english/english After installing fontawesome, and running the MWE that you had enclosed, I get the following error: fontssymbols library 'fontawesome' is unknown And no symbols are output. 'fontawesome' is loaded: $ mtxrun --script fonts --list --all --pattern=fontawesome 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) fontawesome fontawesome /home/pavneet/.fonts/opentype/font-awesome-4.3.0/fonts/FontAwesome.otf fontawesomenormalfontawesome /home/pavneet/.fonts/opentype/font-awesome-4.3.0/fonts/FontAwesome.otf fontawesomeregular fontawesome /home/pavneet/.fonts/opentype/font-awesome-4.3.0/fonts/FontAwesome.otf Also, the '\mysymbol' directive results in an error: tex errorerror on line 24 in file test2.tex: ! Argument of \65 has an extra } inserted text \par to be read again } \symb_place_indeed ...name \??symbol #1\endcsname \relax \endgroup \symb_place_retry ...name \symb_place_indeed {:#1} \else #1\fi \symb_place_normal_c ...lace_retry \currentsymbol \fi \symb_place_normal_b ...else \symb_place_normal_c \fi ... l.24 \symbol[mysymbol] 14 \definesymbol 15 [mysymbol] 16 [\SymbolFrame{\directsymbol{fontawesome}{question}}] 17 18 \starttext 19 20 \startlines 21 \symbol[fontawesome][question] 22 \symbol[fontawesome][question-circle] 23 \framed[strut=no,width=1em,height=1em,background=color,backgroundcolor=black,corner=round,radius=.5ex,foregroundcolor=white]{\symbol[fontawesome][question]} 24 \symbol[mysymbol] 25 \stoplines 26 27 \stoptext 28 What might be the problem? Many thanks. On 29Mar15, Wolfgang Schuster wrote: 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 errorerror on line 7 in file virtual://buffer.noname.1: ! Undefined control sequence l.7 {\simplefont [heydingsicons] q}~123.456.7890 {\simplefont[heydingsicons.. When you use a symbol font define a command for it with \definesymbol and access it with \symbol. The example below uses the Font Awesome [1] font for the symbols (the symbols are defined in the attached file). \usesymbols[fontawesome] \defineframed [SymbolFrame] [strut=no, width=1em, height=1em, background=color, backgroundcolor=black, corner=round, radius=.5ex, foregroundcolor=white] \definesymbol [mysymbol] [\SymbolFrame{\directsymbol{fontawesome}{question}}] \starttext \startlines \symbol[fontawesome][question] \symbol[fontawesome][question-circle] \framed[strut=no,width=1em,height=1em,background=color,backgroundcolor=black,corner=round,radius=.5ex,foregroundcolor=white]{\symbol[fontawesome][question]} \symbol[mysymbol] \stoplines \stoptext -- Pavneet Arora m: 647.406.6843 Waroc Informatikt: 416.937.9276 ___ 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 ___
Re: [NTG-context] Selecting fonts using the built-in simplefonts module
Am 29.03.2015 um 22:29 schrieb Jörg Weger joerg73@googlemail.com: On 29.03.2015 21:31, Wolfgang Schuster wrote: Am 29.03.2015 um 20:33 schrieb Jörg Weger joerg73@googlemail.com mailto:joerg73@googlemail.com mailto:joerg73@googlemail.com mailto:joerg73@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] [tf=style:light,bf=style:regular] I just had it made working this way: \definefontfamily[mainface] [ss] [EgalobhierFarinUrlaubodersonstwasoderwersteht] [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). \definefontfamily[mainface] [sans] [Anything] [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? When you write nonsense as font name without setting a upright font nothing will show up in your document because the fonts aren’t loaded. 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: The \em command uses the slanted and not the italic alternative by default. When there is no italic or slanted style in the font the regular style is used and when there is no bolditalic or boldslanted style the bold style is used. %%% MWE \definefontfamily[mainface][ss][EgalobhierFarinUrlaubodersonstwassteht][tf=Roboto Light Italic, bf=Roboto Black Italic] \setupbodyfont[mainface,9pt] \starttext \ss \input lorem \ss \bf \input lorem \ss \tf \em \input lorem \ss \bf \em \input lorem \stoptext %% 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). You don’t need a serif and a sans font in your document, one of them is enough but math should be always present because some symbols like bullets (but you can force context to take them from the text font) are taken from math. 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 available. 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 more self-explaining? It doesn’t matter whether you use rm or serif in the second argument because the argument is checked and converted to a internal name. 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 ___
Re: [NTG-context] Selecting fonts using the built-in simplefonts module
Am 29.03.2015 um 20:33 schrieb Jörg Weger joerg73@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] [tf=style:light,bf=style:regular] I just had it made working this way: \definefontfamily[mainface] [ss] [EgalobhierFarinUrlaubodersonstwasoderwersteht] [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). \definefontfamily[mainface] [sans] [Anything] [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. 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 available. Are there any reasons why one should not use any of all those synonyms? What do you mean? 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 ___
Re: [NTG-context] Selecting fonts using the built-in simplefonts module
Dear Joerg, Thanks for your response. I am just going through the full thread, but in response to your question, I am using Ubuntu with Unity. I was using the GUI Font Viewer to inspect the font, but otfinfo is more to my liking. Having said that, here is its output with the '-a' option (-a, --family Report font’s family name.): $ otfinfo -a Junction-light.otf Junction Light So, it would seem that Junction Light is a valid 'expanded name' in the Junction Master series, although, of course, not the true family name. I am still digesting further the responses by Pablo and Wolfgang. Warm regards. On 29Mar15, Jörg Weger wrote: 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 -- Pavneet Arora m: 647.406.6843 Waroc Informatikt: 416.937.9276 ___ 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 ___
Re: [NTG-context] Selecting fonts using the built-in simplefonts module
Perfect. This is an appropriately succinct syntax. \definefontfamily [mainface] [ss] [Junction] [tf=* Light,bf=* Regular] Message: 3 Date: Sun, 29 Mar 2015 21:31:30 +0200 From: Wolfgang Schuster schuster.wolfg...@gmail.com To: mailing list for ConTeXt users ntg-context@ntg.nl Subject: Re: [NTG-context] Selecting fonts using the built-in simplefonts module Message-ID: 12dc7a91-4a01-4a28-b578-4327cbc64...@gmail.com Content-Type: text/plain; charset=utf-8 Am 29.03.2015 um 20:33 schrieb Jörg Weger joerg73@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] [tf=style:light,bf=style:regular] I just had it made working this way: \definefontfamily[mainface] [ss] [EgalobhierFarinUrlaubodersonstwasoderwersteht] [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). \definefontfamily[mainface] [sans] [Anything] [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. -- Pavneet Arora m: 647.406.6843 Waroc Informatikt: 416.937.9276 ___ 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 ___
Re: [NTG-context] Selecting fonts using the built-in simplefonts module
Am 29.03.2015 um 22:44 schrieb Pavneet Arora pavneet_ar...@waroc.com: Dear Wolfgang, I am using: ConTeXt ver: 2015.03.28 22:37 MKIV beta fmt: 2015.3.29 int: english/english After installing fontawesome, and running the MWE that you had enclosed, I get the following error: fontssymbols library 'fontawesome' is unknown And no symbols are output. 'fontawesome' is loaded: $ mtxrun --script fonts --list --all --pattern=fontawesome 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) fontawesome fontawesome /home/pavneet/.fonts/opentype/font-awesome-4.3.0/fonts/FontAwesome.otf fontawesomenormalfontawesome /home/pavneet/.fonts/opentype/font-awesome-4.3.0/fonts/FontAwesome.otf fontawesomeregular fontawesome /home/pavneet/.fonts/opentype/font-awesome-4.3.0/fonts/FontAwesome.otf Also, the '\mysymbol' directive results in an error: tex errorerror on line 24 in file test2.tex: ! Argument of \65 has an extra } inserted text \par to be read again } \symb_place_indeed ...name \??symbol #1\endcsname \relax \endgroup \symb_place_retry ...name \symb_place_indeed {:#1} \else #1\fi \symb_place_normal_c ...lace_retry \currentsymbol \fi \symb_place_normal_b ...else \symb_place_normal_c \fi ... l.24 \symbol[mysymbol] 14 \definesymbol 15 [mysymbol] 16 [\SymbolFrame{\directsymbol{fontawesome}{question}}] 17 18 \starttext 19 20 \startlines 21 \symbol[fontawesome][question] 22 \symbol[fontawesome][question-circle] 23 \framed[strut=no,width=1em,height=1em,background=color,backgroundcolor=black,corner=round,radius=.5ex,foregroundcolor=white]{\symbol[fontawesome][question]} 24 \symbol[mysymbol] 25 \stoplines 26 27 \stoptext 28 What might be the problem? Put the attached file (symbol-fontawsome.mkiv) from my last mail in the same folder as your document. 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 ___