Hello, Is there a font in the minimals with bold small caps? I've tried lm and some tex-gyre fonts, but no success so far... Test file: \setupbodyfont[???] \starttext {\sc\bf Test} or {\bf\sc Test} should give bold small caps... \stoptext http://wiki.contextgarden.net/Pseudo_Small_Caps seems to apply only to mkii. TIA for any help! Peter -- Contact information: http://pmrb.free.fr/contact/
On Dec 11, 2010, at 23:40 , Peter Münster wrote:
Hello,
Is there a font in the minimals with bold small caps? I've tried lm and some tex-gyre fonts, but no success so far...
Test file:
\setupbodyfont[???] \starttext {\sc\bf Test} or {\bf\sc Test} should give bold small caps... \stoptext
Hi, this should work: \setupbodyfont[pagella] \starttext {\setff{smallcaps} SmallCaps {\bf BoldCaps}} \stoptext Florian
On Sat, Dec 11 2010, Florian Wobbe wrote:
{\setff{smallcaps} SmallCaps {\bf BoldCaps}}
Hello, Thanks! What's the difference between \sc and \setff{smallcaps}? Could something like "\def\sc{\setff{smallcaps}}" in the preamble harm in any way? Depending on your answers, I would perhaps request to trigger \setff{smallcaps} by \sc in the core. Peter -- Contact information: http://pmrb.free.fr/contact/
Am 12.12.2010 um 00:12 schrieb Peter Münster:
On Sat, Dec 11 2010, Florian Wobbe wrote:
{\setff{smallcaps} SmallCaps {\bf BoldCaps}}
Hello,
Thanks! What's the difference between \sc and \setff{smallcaps}?
By default \sc switch to a different font like \it or \bf but now with opentype fonts smallcaps are a part of many fonts which can be enabled with the smcp feature.
Could something like "\def\sc{\setff{smallcaps}}" in the preamble harm in any way?
I would change this to \definefontfeature[smcp][mode=node,smcp=yes] \unexpanded\def\sc{\addfs{smcp}}
Depending on your answers, I would perhaps request to trigger \setff{smallcaps} by \sc in the core.
Can be a problem because we have font (e.g. Latin Modern) where smallcaps are still in a separate file. Wolfgang
On 2010-12-12 Wolfgang Schuster
Depending on your answers, I would perhaps request to trigger \setff{smallcaps} by \sc in the core.
Can be a problem because we have font (e.g. Latin Modern) where smallcaps are still in a separate file. So the user has to know in which fashion the small caps were created, as font feature or in a seperate file. That's not very convenient. When the user switches to another font it may break the document, since he has to change the \setff{smallcaps} to \sc.
Maybe it is possible that the \sc macro can check if the font contains the small caps as a feature. Is there a switch like \doiffontfeatureexists{smcp}{...}? I have the following logic in mind: 1) Check if small caps are a font feature, if not 2) check if small caps are in a seperate font, if not 3) fake them. Regards Marco
Am 12.12.2010 um 16:22 schrieb Marco:
On 2010-12-12 Wolfgang Schuster
wrote: Depending on your answers, I would perhaps request to trigger \setff{smallcaps} by \sc in the core.
Can be a problem because we have font (e.g. Latin Modern) where smallcaps are still in a separate file. So the user has to know in which fashion the small caps were created, as font feature or in a seperate file. That's not very convenient. When the user switches to another font it may break the document, since he has to change the \setff{smallcaps} to \sc.
Maybe it is possible that the \sc macro can check if the font contains the small caps as a feature. Is there a switch like \doiffontfeatureexists{smcp}{...}? I have the following logic in mind:
1) Check if small caps are a font feature, if not 2) check if small caps are in a seperate font, if not 3) fake them.
\startluacode function commands.doifelsecurrentfonthasfeature(name) local f = fonts.identifiers[font.current()] f = f and f.shared f = f and f.otfdata f = f and f.luatex f = f and f.features commands.doifelse(f and (f.gpos[name] or f.gsub[name])) end \stopluacode \def\doifelsecurrentfonthasfeature#1% {\ctxlua{commands.doifelsecurrentfonthasfeature("#1")}} \let\normalsc\sc \definefontfeature[smcp][smcp=yes] \definefontfeature[latn][script=latn] \unexpanded\def\sc{\doifelsecurrentfonthasfeature{smcp}{\addfs{smcp}}\normalsc} \starttext \tf text \sc text \switchtobodyfont[cambria]\addfs{latn} % cambria needs the latin script for smallcaps \tf text \addfs{smcp} text \switchtobodyfont[modern] \tf text \sc text \stoptext Wolfgang
On Sun, Dec 12 2010, Wolfgang Schuster wrote:
\unexpanded\def\sc{\doifelsecurrentfonthasfeature{smcp}{\addfs{smcp}}\normalsc}
Nice! Hans, what about integration into the core? Thanks Wolfgang! Peter -- Contact information: http://pmrb.free.fr/contact/
On 12-12-2010 8:39, Peter Münster wrote:
On Sun, Dec 12 2010, Wolfgang Schuster wrote:
\unexpanded\def\sc{\doifelsecurrentfonthasfeature{smcp}{\addfs{smcp}}\normalsc}
Nice! Hans, what about integration into the core?
when it works out ok, I'm sure that wolfgang and I will look into it Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 2010-12-12 Wolfgang Schuster
Maybe it is possible that the \sc macro can check if the font contains the small caps as a feature. Is there a switch like \doiffontfeatureexists{smcp}{...}?
\startluacode function commands.doifelsecurrentfonthasfeature(name) local f = fonts.identifiers[font.current()] f = f and f.shared f = f and f.otfdata f = f and f.luatex f = f and f.features commands.doifelse(f and (f.gpos[name] or f.gsub[name])) end \stopluacode
\def\doifelsecurrentfonthasfeature#1% {\ctxlua{commands.doifelsecurrentfonthasfeature("#1")}}
\let\normalsc\sc \definefontfeature[smcp][smcp=yes] \definefontfeature[latn][script=latn]
\unexpanded\def\sc{\doifelsecurrentfonthasfeature{smcp}{\addfs{smcp}}\normalsc}
\starttext
\tf text \sc text
\switchtobodyfont[cambria]\addfs{latn} % cambria needs the latin script for smallcaps
\tf text \addfs{smcp} text
\switchtobodyfont[modern]
\tf text \sc text
\stoptext That's a nice piece of code! Thanks for your effort.
Marco
participants (5)
-
Florian Wobbe
-
Hans Hagen
-
Marco
-
Peter Münster
-
Wolfgang Schuster