Difference between revisions of "Pseudo Small Caps"

From Wiki
Jump to navigation Jump to search
m
 
(15 intermediate revisions by 5 users not shown)
Line 1: Line 1:
< [[Visuals]] < [[Fonts]]
+
< [[Basics|Text formatting]]
  
Your font has no Small Caps variant? Do you need Small Caps switching depending on the \it, \bf, \bi, \tt, \ss, ... ? Here is the recipe for generating and installing Pseudo Small Caps (small letters are scaled down versions of capitals - typographicaly not clear solution but if the font has no real Small Caps...). The example is done on Latin Modern family but can be applied to another Type1 or TTF font type.
+
Your font has no Small Caps variant? Do you need Small Caps switching depending on the \it, \bf, \bi, \tt, \ss, ... ? Here is the recipe for generating and installing Pseudo Small Caps (small letters are scaled down versions of capitals - typographicaly not clear solution but if the font has no real Small Caps...). The example is done on Latin Modern family but can be applied to another Type1 font.  
  
1. Pseudo Small Caps generation [http://typokvitek.com/tex/pseudocaps/make-pseudocaps.txt All commands (txt)]<br>
+
1. Pseudo Small Caps generation. [http://typokvitek.com/tex/context/pseudocaps/make-pseudocaps.txt All commands (txt)]<br>
 
<texcode>
 
<texcode>
 
texfont --fontroot=X:\ --en=ec --ve=public --co=lm --source=auto --ca=0.8 lmbx10
 
texfont --fontroot=X:\ --en=ec --ve=public --co=lm --source=auto --ca=0.8 lmbx10
 
</texcode><br>
 
</texcode><br>
2. Typescript definitions [http://typokvitek.com/tex/pseudocaps/type-lm-var.tex Complete type script] (copy URL to browser?!)
+
2. Typescript definitions. [http://typokvitek.com/tex/context/pseudocaps/type-lm-var.tex Complete type script] (copy URL to browser?!)
 
: a) Metric file correspondencies:<br>
 
: a) Metric file correspondencies:<br>
 
<texcode>
 
<texcode>
Line 46: Line 46:
 
\stoptypescript
 
\stoptypescript
 
</texcode><br>
 
</texcode><br>
3. Usage [http://typokvitek.com/tex/pseudocaps/smallcaps.pdf PDF] [http://typokvitek.com/tex/pseudocaps/smallcaps.tex Source] (copy URL to browser?!)
+
3. Usage. [http://typokvitek.com/tex/context/pseudocaps/smallcaps.pdf PDF] [http://typokvitek.com/tex/context/pseudocaps/smallcaps.tex Source] (copy URL to browser?!)
 
<texcode>
 
<texcode>
 
\usetypescriptfile[type-lm-var]
 
\usetypescriptfile[type-lm-var]
Line 55: Line 55:
 
\usetypescript[modern][ec]
 
\usetypescript[modern][ec]
 
\setupbodyfont[10pt,rm]
 
\setupbodyfont[10pt,rm]
 +
 +
\def\sc{\Var[SmallCaps]}
  
 
\starttext
 
\starttext
{Ahoj \Var[SmallCaps] Ahoj}\par
+
{   Ahoj \sc Ahoj}\par
{\it Ahoj \Var[SmallCaps] Ahoj}\par
+
{\it Ahoj \sc Ahoj}\par
{\bf Ahoj \Var[SmallCaps] Ahoj}\par
+
{\bf Ahoj \sc Ahoj}\par
{\bi Ahoj \Var[SmallCaps] Ahoj}\par
+
{\bi Ahoj \sc Ahoj}\par
  
{\tt
+
{\ss
{Ahoj \Var[SmallCaps] Ahoj}\par
+
{   Ahoj \sc Ahoj}\par
{\it Ahoj \Var[SmallCaps] Ahoj}\par
+
{\it Ahoj \sc Ahoj}\par
 +
{\bf Ahoj \sc Ahoj}\par
 
}
 
}
  
{\ss
+
{\tt % Note: pseudo caps breaks monospacing!
{Ahoj \Var[SmallCaps] Ahoj}\par
+
{   Ahoj \sc Ahoj}\par
{\it Ahoj \Var[SmallCaps] Ahoj}\par
+
{\it Ahoj \sc Ahoj}\par
{\bf Ahoj \Var[SmallCaps] Ahoj}\par
 
 
}
 
}
 
\stoptext
 
\stoptext
 
</texcode>
 
</texcode>
 +
 +
[[Category:Old_Content]]

Latest revision as of 16:28, 8 June 2020

< Text formatting

Your font has no Small Caps variant? Do you need Small Caps switching depending on the \it, \bf, \bi, \tt, \ss, ... ? Here is the recipe for generating and installing Pseudo Small Caps (small letters are scaled down versions of capitals - typographicaly not clear solution but if the font has no real Small Caps...). The example is done on Latin Modern family but can be applied to another Type1 font.

1. Pseudo Small Caps generation. All commands (txt)

texfont --fontroot=X:\ --en=ec --ve=public --co=lm --source=auto --ca=0.8 lmbx10


2. Typescript definitions. Complete type script (copy URL to browser?!)

a) Metric file correspondencies:
\starttypescript [all] [latin-modern,computer-modern] [texnansi,ec,qx,pl0,il2,t5]
...
  \definefontsynonym [cmtcsc10]  [\typescriptthree-lmtcsc10]  [encoding=\typescriptthree]
...
  \definefontsynonym [cmcscbx10] [\typescriptthree-lmbx10-capitalized-800] [encoding=\typescriptthree]
\stoptypescript


b) Making \Var[SmallCaps] in Serif, Sans, and Mono:
\starttypescript [serif] [computer-modern,latin-modern] [default]
  ...
  \definefontsynonym [SerifRegular]                      [ComputerModern]
  \definefontsynonym [SerifBold]                         [ComputerModern-Bold]
  \definefontsynonym [SerifItalic]                       [ComputerModern-Italic]
  \definefontsynonym [SerifBoldItalic]                   [ComputerModern-BoldItalic]
  \definefontsynonym [SerifRegularCaps]	                 [ComputerModern-Caps]

  \definefontsynonym [SerifSmallCaps]	                 [ComputerModern-Caps]
  \definefontsynonym [SerifItalicSmallCaps]              [cmcsci10]
  \definefontsynonym [SerifBoldSmallCaps]                [cmcscbx10]
  \definefontsynonym [SerifBoldItalicSmallCaps]          [cmcscbxi10]

  \definefontsynonym [SerifRegular]                      [Serif]
  \definefontsynonym [SerifRegularSmallCaps]             [SerifSmallCaps]

  \definefontvariant [Serif] [SmallCaps] [SmallCaps]
\stoptypescript

\starttypescript [sans] [computer-modern,latin-modern] [default]
  ...
\stoptypescript

\starttypescript [mono] [computer-modern,latin-modern] [default]
  ...
\stoptypescript


3. Usage. PDF Source (copy URL to browser?!)

\usetypescriptfile[type-lm-var]
\usetypescript[all][computer-modern,latin-modern][ec]
\usetypescript[serif][computer-modern,latin-modern][default]
\usetypescript[sans][computer-modern,latin-modern][default]
\usetypescript[mono][computer-modern,latin-modern][default]
\usetypescript[modern][ec]
\setupbodyfont[10pt,rm]

\def\sc{\Var[SmallCaps]}

\starttext
{    Ahoj \sc Ahoj}\par
{\it Ahoj \sc Ahoj}\par
{\bf Ahoj \sc Ahoj}\par
{\bi Ahoj \sc Ahoj}\par

{\ss
{    Ahoj \sc Ahoj}\par
{\it Ahoj \sc Ahoj}\par
{\bf Ahoj \sc Ahoj}\par
}

{\tt % Note: pseudo caps breaks monospacing!
{    Ahoj \sc Ahoj}\par
{\it Ahoj \sc Ahoj}\par
}
\stoptext