%%% ==================================================================== %%% @TeX-font-metrics-file{ %%% author = "Lars Hellstr{\"o}m", %%% date = "2003-03-29", %%% time = "16:16:56 +01:00", %%% filename = "lsbuild.mtx", %%% email = "fontinst@tug.org", %%% URL = "http://www.tug.org/applications/fontinst/", %%% checksum = "", %%% codetable = "ISO/ASCII", %%% keywords = "metrics, TeX, PostScript", %%% supported = "yes", %%% abstract = "This is a font metrics file, for use with the %%% fontinst utility. It builds less common %%% small caps letters from plain ones and %%% accents.", %%% package = "fontinst", %%% dependencies = "fontinst.sty, fontdoc.sty", %%% } %%% ==================================================================== \relax \documentclass[twocolumn]{article} \usepackage{fontdoc}[2002/03/01] \showbranches \title{Building latin smallcaps letters} \author{Lars Hellstr\"om} \date{3 January 2003} \begin{document} \maketitle This file contains commands that build some proper small capital glyphs from other small capital glyphs, but nothing is done is those base glyphs have not already been set. If you want to \emph{fake} small capitals using full capitals, then have a look at \texttt{lsfake.mtx} instead. \metrics \needsfontinstversion{1.917} \usemtxpackage{ltcmds} \ProvidesMtxPackage{lsbuild} \begincomment \section{Proper latin small capitals} \subsection{Some utility commands} \endcomment \setcommand\setcsctopglyph#1#2#3#4{ \ifareglyphs{#2small,#3}\then \setglyph{#1} \topaccent{#2small}{#3}{#4} \endsetglyph \setleftrightkerning{#1}{#2small}{1000} \Fi } \setcommand\setcscbotglyph#1#2#3#4{ \ifareglyphs{#2small,#3}\then \setglyph{#1} \botaccent{#2small}{#3}{#4} \endsetglyph \setleftrightkerning{#1}{#2small}{1000} \Fi } \begincomment\medskip A \textbf{Try: Set glyph} is an ordinary \textbf{Set glyph} which is conditional on that a set of glyphs (those used to construct the composite glyph) are available. It is technically e.g. \begin{quotation} \setcsctopglyph{\macroparameter{1}}{\macroparameter{2}}% {\macroparameter{3}}{\macroparameter{4}} \setcscbotglyph{\macroparameter{1}}{\macroparameter{2}}% {\macroparameter{3}}{\macroparameter{4}}\par \end{quotation} (both of which are implemented in the code as simple four argument commands), but in the list of commands below those two commands will be typeset as \resetcommand\setcsctopglyph#1#2#3#4{% \Aheading{Try: Set glyph `\TypesetStringExpression{#1}'} \topaccent{#2small}{#3}{#4} \setleftrightkerning{#1}{#2small}{1000} } \resetcommand\setcscbotglyph#1#2#3#4{% \Aheading{Try: Set glyph `\TypesetStringExpression{#1}'} \botaccent{#2small}{#3}{#4} \setleftrightkerning{#1}{#2small}{1000} } \begin{quotation} \setcsctopglyph{\macroparameter{1}}{\macroparameter{2}}% {\macroparameter{3}}{\macroparameter{4}} \setcscbotglyph{\macroparameter{1}}{\macroparameter{2}}% {\macroparameter{3}}{\macroparameter{4}} \end{quotation} \endcomment \begincomment \subsection{Getting the \textit{smallcapsscale} right} The \textit{smallcapsscale} integer is normally only used when faking smallcaps by shrinking capitals, but with one of the glyphs below (\texttt{Lcaron}) it is actually used for shrinking the right quote. Thus a suitable default value has to be assigned to it. \endcomment \ifareglyphs{L,Lsmall}\then \setint{smallcapsscale}{ \div{\mul{1000}{\height{Lsmall}}}{\height{L}} } \Else \setint{smallcapsscale}{800} \Fi \begincomment \subsection{Accenting smallcaps glyphs} The commands below build accented smallcaps letters from existing smallcaps letters and normal accents. The accent positions are the ones traditionally used in \texttt{latin.mtx}. \endcomment \setcsctopglyph{Aacutesmall}{A}{acute}{500} \setcsctopglyph{Abrevesmall}{A}{breve}{500} \setcsctopglyph{Acircumflexsmall}{A}{circumflex}{500} \setcsctopglyph{Adieresissmall}{A}{dieresis}{500} \setcsctopglyph{Agravesmall}{A}{grave}{500} \setcscbotglyph{Aogoneksmall}{A}{ogonek}{900} \setcsctopglyph{Aringsmall}{A}{ring}{500} \setcsctopglyph{Atildesmall}{A}{tilde}{500} \setcsctopglyph{Cacutesmall}{C}{acute}{500} \setcsctopglyph{Ccaronsmall}{C}{caron}{500} \setcsctopglyph{Ccedillasmall}{C}{cedilla}{500} \setcsctopglyph{Dcaronsmall}{D}{caron}{500} \setcsctopglyph{Eacutesmall}{E}{acute}{500} \setcsctopglyph{Ecaronsmall}{E}{caron}{500} \setcsctopglyph{Ecircumflexsmall}{E}{circumflex}{500} \setcsctopglyph{Edieresissmall}{E}{dieresis}{500} \setcsctopglyph{Egravesmall}{E}{grave}{500} \setcscbotglyph{Eogoneksmall}{E}{ogonek}{850} \setcsctopglyph{Gbrevesmall}{G}{breve}{500} \setcsctopglyph{Iacutesmall}{I}{acute}{500} \setcsctopglyph{Icircumflexsmall}{I}{circumflex}{500} \setcsctopglyph{Idieresissmall}{I}{dieresis}{500} \setcsctopglyph{Idotaccentsmall}{I}{dotaccent}{500} \setcsctopglyph{Igravesmall}{I}{grave}{500} \setcsctopglyph{Lacutesmall}{L}{acute}{250} \ifareglyphs{Lsmall,quoteright}\then \setglyph{Lcaronsmall} \glyph{Lsmall}{1000} \ifisint{monowidth}\then\Else \movert{-100} \Fi \glyph{quoteright}{\int{smallcapsscale}} \endsetglyph \setleftkerning{Lcaronsmall}{Lsmall}{1000} \Fi \setcsctopglyph{Nacutesmall}{N}{acute}{500} \setcsctopglyph{Ncaronsmall}{N}{caron}{500} \setcsctopglyph{Ntildesmall}{N}{tilde}{500} \setcsctopglyph{Oacutesmall}{O}{acute}{500} \setcsctopglyph{Ocircumflexsmall}{O}{circumflex}{500} \setcsctopglyph{Odieresissmall}{O}{dieresis}{500} \setcsctopglyph{Ogravesmall}{O}{grave}{500} \setcsctopglyph{Ohungarumlautsmall}{O}{hungarumlaut}{500} \setcsctopglyph{Otildesmall}{O}{tilde}{500} \setcsctopglyph{Racutesmall}{R}{acute}{500} \setcsctopglyph{Rcaronsmall}{R}{caron}{500} \setcsctopglyph{Sacutesmall}{S}{acute}{500} \setcsctopglyph{Scaronsmall}{S}{caron}{500} \setcscbotglyph{Scedillasmall}{S}{cedilla}{500} \setcsctopglyph{Tcaronsmall}{T}{caron}{500} \setcscbotglyph{Tcedillasmall}{T}{cedilla}{500} \setcsctopglyph{Uacutesmall}{U}{acute}{500} \setcsctopglyph{Ucircumflexsmall}{U}{circumflex}{500} \setcsctopglyph{Udieresissmall}{U}{dieresis}{500} \setcsctopglyph{Ugravesmall}{U}{grave}{500} \setcsctopglyph{Uhungarumlautsmall}{U}{hungarumlaut}{500} \setcsctopglyph{Uringsmall}{U}{ring}{500} \setcsctopglyph{Yacutesmall}{Y}{acute}{500} \setcsctopglyph{Ydieresissmall}{Y}{dieresis}{500} \setcsctopglyph{Zacutesmall}{Z}{acute}{500} \setcsctopglyph{Zcaronsmall}{Z}{caron}{500} \setcsctopglyph{Zdotaccentsmall}{Z}{dotaccent}{500} \begincomment \subsection{Other glyphs that can be built} \endcomment \ifisglyph{Dcroatsmall}\then \setglyph{Dbarsmall} \glyph{Dcroatsmall}{1000} \endsetglyph \setleftrightkerning{Dbarsmall}{Dcroatsmall}{1000} \Else\ifisglyph{Ethsmall}\then \setglyph{Dbarsmall} \glyph{Ethsmall}{1000} \endsetglyph \setleftrightkerning{Dbarsmall}{Ethsmall}{1000} \Fi\Fi \endmetrics \texttt{Dbar} and \texttt{Dbarsmall} are old names for this glyph; nowadays the standard names are rather \texttt{Dcroat} and \texttt{Dcroatsmall}, but using those names throughout would require a coordinated change of the ETX files. It is probably possible to build a decent \texttt{Dbarsmall} from \texttt{Dsmall} and an \texttt{lslashslash} (or the like), similarly to the case with \texttt{dbar}, but that would require some experimentation. \section{Changes} This file was created 2003/01/02--05. It is loosely based on parts of \texttt{latin.mtx}. (LH) 2003/02/06: Added setting of \textit{smallcapsscale}, and made \texttt{Lcaron} kern like \texttt{L} only on the left (not on the right). (LH) \end{document} % Copyright 2003 the fontinst maintenance team and any individual % authors listed elsewhere in this file. All rights reserved. % % This file is part of the fontinst system version 1.9. % ----------------------------------------------------- % % It may be distributed under the terms of the LaTeX Project Public % License, as described in lppl.txt in the base LaTeX distribution. % Either version 1.2 or, at your option, any later version. %