ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Simplefonts and inherited style
@ 2013-11-11 16:52 Joshua Krämer
  2013-11-11 17:31 ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Joshua Krämer @ 2013-11-11 16:52 UTC (permalink / raw)
  To: ntg-context-wvrSQK3plZs

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

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Simplefonts and inherited style
  2013-11-11 16:52 Simplefonts and inherited style Joshua Krämer
@ 2013-11-11 17:31 ` Wolfgang Schuster
  2013-11-11 19:46   ` Joshua Krämer
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2013-11-11 17:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1398 bytes --]


> 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

[-- Attachment #1.2.1: Type: text/html, Size: 2778 bytes --]

[-- Attachment #1.2.2: compose-unknown-contact.jpg --]
[-- Type: image/jpeg, Size: 770 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Simplefonts and inherited style
  2013-11-11 17:31 ` Wolfgang Schuster
@ 2013-11-11 19:46   ` Joshua Krämer
  2013-11-11 20:00     ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Joshua Krämer @ 2013-11-11 19:46 UTC (permalink / raw)
  To: ntg-context-wvrSQK3plZs

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

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Simplefonts and inherited style
  2013-11-11 19:46   ` Joshua Krämer
@ 2013-11-11 20:00     ` Wolfgang Schuster
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2013-11-11 20:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 780 bytes --]

> 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

[-- Attachment #1.2.1: Type: text/html, Size: 2297 bytes --]

[-- Attachment #1.2.2: compose-unknown-contact.jpg --]
[-- Type: image/jpeg, Size: 770 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-11 20:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-11 16:52 Simplefonts and inherited style Joshua Krämer
2013-11-11 17:31 ` Wolfgang Schuster
2013-11-11 19:46   ` Joshua Krämer
2013-11-11 20:00     ` Wolfgang Schuster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).