| 1 |
%% |
| 2 |
%% This is file `fontscripts-dotscbuild.mtx', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% fontscripts.dtx (with options: `dotscbuild') |
| 8 |
%% |
| 9 |
%% Additions and changes Copyright (C) 2008-2025 Clea F. Rees. |
| 10 |
%% Code from fontinst Copyright (C) 2002 Alan Jeffrey and Sebastian |
| 11 |
%% Rahtz and Ulrik Vieth and Lars Hellström (see below) (see below) |
| 12 |
%% |
| 13 |
%% This work may be distributed and/or modified under the |
| 14 |
%% conditions of the LaTeX Project Public License, either version 1.3c |
| 15 |
%% of this license or (at your option) any later version. |
| 16 |
%% The latest version of this license is in |
| 17 |
%% https://www.latex-project.org/lppl.txt |
| 18 |
%% and version 1.3c or later is part of all distributions of LaTeX |
| 19 |
%% version 2008-05-04 or later. |
| 20 |
%% |
| 21 |
%% This work has the LPPL maintenance status `maintained'. |
| 22 |
%% |
| 23 |
%% The Current Maintainer of this work is Clea F. Rees. |
| 24 |
%% |
| 25 |
%% This work consists of all files listed in manifest.txt. |
| 26 |
%% |
| 27 |
%% The metrics file fontscripts-dotscbuild.mtx is a derived work under the terms of the LPPL. |
| 28 |
%% It is based on lsbuild.mtx from fontinst. A copy of fontinst |
| 29 |
%% including a copy of lsbuild.mtx is available from |
| 30 |
%% https://www.ctan.org/pkg/fontinst. See lsbuild.mtx for commentary. |
| 31 |
%% |
| 32 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 33 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 34 |
\relax |
| 35 |
|
| 36 |
\metrics |
| 37 |
|
| 38 |
\needsfontinstversion{1.917} |
| 39 |
|
| 40 |
\usemtxpackage{ltcmds} |
| 41 |
\ProvidesMtxPackage{dotscbuild} |
| 42 |
|
| 43 |
\begincomment |
| 44 |
\section{Proper latin small capitals} |
| 45 |
|
| 46 |
\subsection{Some utility commands} |
| 47 |
\endcomment |
| 48 |
|
| 49 |
\setcommand\setcsctopglyph#1#2#3#4{ |
| 50 |
\ifareglyphs{#2.sc,#3}\then |
| 51 |
\setglyph{#1} |
| 52 |
\topaccent{#2.sc}{#3}{#4} |
| 53 |
\endsetglyph |
| 54 |
\setleftrightkerning{#1}{#2.sc}{1000} |
| 55 |
\Fi |
| 56 |
} |
| 57 |
\setcommand\setcscbotglyph#1#2#3#4{ |
| 58 |
\ifareglyphs{#2.sc,#3}\then |
| 59 |
\setglyph{#1} |
| 60 |
\botaccent{#2.sc}{#3}{#4} |
| 61 |
\endsetglyph |
| 62 |
\setleftrightkerning{#1}{#2.sc}{1000} |
| 63 |
\Fi |
| 64 |
} |
| 65 |
\begincomment\medskip |
| 66 |
A \textbf{Try: Set glyph} is an ordinary \textbf{Set glyph} which is |
| 67 |
conditional on that a set of glyphs (those used to construct the |
| 68 |
composite glyph) are available. It is technically e.g. |
| 69 |
\begin{quotation} |
| 70 |
\setcsctopglyph{\macroparameter{1}}{\macroparameter{2}}% |
| 71 |
{\macroparameter{3}}{\macroparameter{4}} |
| 72 |
\setcscbotglyph{\macroparameter{1}}{\macroparameter{2}}% |
| 73 |
{\macroparameter{3}}{\macroparameter{4}}\par |
| 74 |
\end{quotation} |
| 75 |
(both of which are implemented in the code as simple four argument |
| 76 |
commands), but in the list of commands below those two commands will |
| 77 |
be typeset as |
| 78 |
\resetcommand\setcsctopglyph#1#2#3#4{% |
| 79 |
\Aheading{Try: Set glyph `\TypesetStringExpression{#1}'} |
| 80 |
\topaccent{#2.sc}{#3}{#4} |
| 81 |
\setleftrightkerning{#1}{#2.sc}{1000} |
| 82 |
} |
| 83 |
\resetcommand\setcscbotglyph#1#2#3#4{% |
| 84 |
\Aheading{Try: Set glyph `\TypesetStringExpression{#1}'} |
| 85 |
\botaccent{#2.sc}{#3}{#4} |
| 86 |
\setleftrightkerning{#1}{#2.sc}{1000} |
| 87 |
} |
| 88 |
\begin{quotation} |
| 89 |
\setcsctopglyph{\macroparameter{1}}{\macroparameter{2}}% |
| 90 |
{\macroparameter{3}}{\macroparameter{4}} |
| 91 |
\setcscbotglyph{\macroparameter{1}}{\macroparameter{2}}% |
| 92 |
{\macroparameter{3}}{\macroparameter{4}} |
| 93 |
\end{quotation} |
| 94 |
\endcomment |
| 95 |
|
| 96 |
\ifareglyphs{L,l.sc}\then |
| 97 |
\setint{smallcapsscale}{ |
| 98 |
\div{\mul{1000}{\height{l.sc}}}{\height{L}} |
| 99 |
} |
| 100 |
\Else |
| 101 |
\setint{smallcapsscale}{800} |
| 102 |
\Fi |
| 103 |
|
| 104 |
\setcsctopglyph{aacute.sc}{a}{acute}{500} |
| 105 |
\setcsctopglyph{abreve.sc}{a}{breve}{500} |
| 106 |
\setcsctopglyph{acircumflex.sc}{a}{circumflex}{500} |
| 107 |
\setcsctopglyph{adieresis.sc}{a}{dieresis}{500} |
| 108 |
\setcsctopglyph{agrave.sc}{a}{grave}{500} |
| 109 |
\setcscbotglyph{aogonek.sc}{a}{ogonek}{900} |
| 110 |
\setcsctopglyph{aring.sc}{a}{ring}{500} |
| 111 |
\setcsctopglyph{atilde.sc}{a}{tilde}{500} |
| 112 |
|
| 113 |
\setcsctopglyph{cacute.sc}{c}{acute}{500} |
| 114 |
\setcsctopglyph{ccaron.sc}{c}{caron}{500} |
| 115 |
\setcsctopglyph{ccedilla.sc}{c}{cedilla}{500} |
| 116 |
|
| 117 |
\setcsctopglyph{dcaron.sc}{d}{caron}{500} |
| 118 |
|
| 119 |
\setcsctopglyph{eacute.sc}{e}{acute}{500} |
| 120 |
\setcsctopglyph{ecaron.sc}{e}{caron}{500} |
| 121 |
\setcsctopglyph{ecircumflex.sc}{e}{circumflex}{500} |
| 122 |
\setcsctopglyph{edieresis.sc}{e}{dieresis}{500} |
| 123 |
\setcsctopglyph{egrave.sc}{e}{grave}{500} |
| 124 |
\setcscbotglyph{eogonek.sc}{e}{ogonek}{850} |
| 125 |
|
| 126 |
\setcsctopglyph{gbreve.sc}{g}{breve}{500} |
| 127 |
|
| 128 |
\setcsctopglyph{iacute.sc}{i}{acute}{500} |
| 129 |
\setcsctopglyph{icircumflex.sc}{i}{circumflex}{500} |
| 130 |
\setcsctopglyph{idieresis.sc}{i}{dieresis}{500} |
| 131 |
\setcsctopglyph{idotaccent.sc}{i}{dotaccent}{500} |
| 132 |
\setcsctopglyph{igrave.sc}{i}{grave}{500} |
| 133 |
|
| 134 |
\setcsctopglyph{lacute.sc}{l}{acute}{250} |
| 135 |
|
| 136 |
\ifareglyphs{l.sc,quoteright}\then |
| 137 |
\setglyph{lcaron.sc} |
| 138 |
\glyph{l.sc}{1000} |
| 139 |
\ifisint{monowidth}\then\Else \movert{-100} \Fi |
| 140 |
\glyph{quoteright}{\int{smallcapsscale}} |
| 141 |
\endsetglyph |
| 142 |
\setleftkerning{lcaron.sc}{l.sc}{1000} |
| 143 |
\Fi |
| 144 |
|
| 145 |
\setcsctopglyph{nacute.sc}{n}{acute}{500} |
| 146 |
\setcsctopglyph{ncaron.sc}{n}{caron}{500} |
| 147 |
\setcsctopglyph{ntilde.sc}{n}{tilde}{500} |
| 148 |
|
| 149 |
\setcsctopglyph{oacute.sc}{o}{acute}{500} |
| 150 |
\setcsctopglyph{ocircumflex.sc}{o}{circumflex}{500} |
| 151 |
\setcsctopglyph{odieresis.sc}{o}{dieresis}{500} |
| 152 |
\setcsctopglyph{ograve.sc}{o}{grave}{500} |
| 153 |
\setcsctopglyph{ohungarumlaut.sc}{o}{hungarumlaut}{500} |
| 154 |
\setcsctopglyph{otilde.sc}{o}{tilde}{500} |
| 155 |
|
| 156 |
\setcsctopglyph{racute.sc}{r}{acute}{500} |
| 157 |
\setcsctopglyph{rcaron.sc}{r}{caron}{500} |
| 158 |
|
| 159 |
\setcsctopglyph{sacute.sc}{s}{acute}{500} |
| 160 |
\setcsctopglyph{scaron.sc}{s}{caron}{500} |
| 161 |
\setcscbotglyph{scedilla.sc}{s}{cedilla}{500} |
| 162 |
|
| 163 |
\setcsctopglyph{tcaron.sc}{t}{caron}{500} |
| 164 |
\setcscbotglyph{tcedilla.sc}{t}{cedilla}{500} |
| 165 |
|
| 166 |
\setcsctopglyph{uacute.sc}{u}{acute}{500} |
| 167 |
\setcsctopglyph{ucircumflex.sc}{u}{circumflex}{500} |
| 168 |
\setcsctopglyph{udieresis.sc}{u}{dieresis}{500} |
| 169 |
\setcsctopglyph{ugrave.sc}{u}{grave}{500} |
| 170 |
\setcsctopglyph{uhungarumlaut.sc}{u}{hungarumlaut}{500} |
| 171 |
\setcsctopglyph{uring.sc}{u}{ring}{500} |
| 172 |
|
| 173 |
\setcsctopglyph{yacute.sc}{y}{acute}{500} |
| 174 |
\setcsctopglyph{ydieresis.sc}{y}{dieresis}{500} |
| 175 |
|
| 176 |
\setcsctopglyph{zacute.sc}{z}{acute}{500} |
| 177 |
\setcsctopglyph{zcaron.sc}{z}{caron}{500} |
| 178 |
\setcsctopglyph{zdotaccent.sc}{z}{dotaccent}{500} |
| 179 |
|
| 180 |
\begincomment |
| 181 |
\subsection{Other glyphs that can be built} |
| 182 |
\endcomment |
| 183 |
|
| 184 |
\ifisglyph{dcroat.sc}\then |
| 185 |
\setglyph{dbar.sc} |
| 186 |
\glyph{dcroat.sc}{1000} |
| 187 |
\endsetglyph |
| 188 |
\setleftrightkerning{dbar.sc}{dcroat.sc}{1000} |
| 189 |
\Else\ifisglyph{eth.sc}\then |
| 190 |
\setglyph{dbar.sc} |
| 191 |
\glyph{eth.sc}{1000} |
| 192 |
\endsetglyph |
| 193 |
\setleftrightkerning{dbar.sc}{eth.sc}{1000} |
| 194 |
\Fi\Fi |
| 195 |
|
| 196 |
\endmetrics |
| 197 |
\endinput |
| 198 |
%% |
| 199 |
%% End of file `fontscripts-dotscbuild.mtx'. |