Dear list members, I need a second font in my text for the purpose of mark-up. This font is defined with \definesimplefonttypeface. If I switch to a font variant like bold and afterwards to the second font, the second font doesn't inherit this style. It only works the other way around (switching to the second font first, then to another style). In the following example, the whole section title should be typeset in bold, but the part using the second font is typeset in the regular style. How can I make it inherit the bold style? Thank you, Joshua Krämer \usemodule[simplefonts] \setmainfont[dejavuserif] \definesimplefonttypeface[Secondfont][dejavusans] \setuphead[section][style={\tf\bf}] \starttext \section{One {\Secondfont Two} Three} \input zapf \stoptext
Joshua Krämer mailto:joshua.kraemer@gmail.com 11. November 2013 17:52 Dear list members,
I need a second font in my text for the purpose of mark-up. This font is defined with \definesimplefonttypeface. If I switch to a font variant like bold and afterwards to the second font, the second font doesn't inherit this style. It only works the other way around (switching to the second font first, then to another style). In the following example, the whole section title should be typeset in bold, but the part using the second font is typeset in the regular style. How can I make it inherit the bold style?
Thank you, Joshua Krämer
\usemodule[simplefonts] \setmainfont[dejavuserif] \definesimplefonttypeface[Secondfont][dejavusans] \setuphead[section][style={\tf\bf}]
\starttext \section{One {\Secondfont Two} Three} \input zapf \stoptext
Old version of the simplefonts module: \usemodule[simplefonts] \setmainfont[DejaVu Serif] \setsansfont[DejaVu Sans] \setuphead[section][style={\tf\bf}] \starttext \section{One {\ss Two} Three} \input zapf \stoptext New version of the simplefonts module: \setupfontfamily [serif] [DejaVu Serif] \setupfontfamily [sans] [DejaVu Sans] \setuphead[section][style={\tf\bf}] \starttext \section{One {\ss Two} Three} \input zapf \stoptext Wolfgang
Dear Wolfgang, thank you, this does the trick. I didn't try \setsansfont, because in reality I don't use serif and sans fonts but blackletter and roman. Does a more general solution exist? If not, I will misuse \setsansfont. By the way, is this new simplefonts version only available in the context beta? I've made an update but still the new commands don't work. Kind regards, Joshua Krämer
Joshua Krämer mailto:joshua.kraemer@gmail.com 11. November 2013 20:46 Dear Wolfgang,
thank you, this does the trick. I didn't try \setsansfont, because in reality I don't use serif and sans fonts but blackletter and roman. Does a more general solution exist? If not, I will misuse \setsansfont. Even though \rm is normally used for a serif font and \ss for a sans serif font there is no rule which prevents you from using a blackletter etc. font with these styles. By the way, is this new simplefonts version only available in the context beta? I've made an update but still the new commands don't work. The new simplefonts module is part of the core (no external files are required) and you need a recent beta to have it available.
Wolfgang
participants (2)
-
Joshua Krämer
-
Wolfgang Schuster