diff options
Diffstat (limited to 'Master/texmf-dist/doc/fontinst/base/encspecs/encspecs.tex')
-rw-r--r-- | Master/texmf-dist/doc/fontinst/base/encspecs/encspecs.tex | 85 |
1 files changed, 63 insertions, 22 deletions
diff --git a/Master/texmf-dist/doc/fontinst/base/encspecs/encspecs.tex b/Master/texmf-dist/doc/fontinst/base/encspecs/encspecs.tex index 3d1027d9415..88911506970 100644 --- a/Master/texmf-dist/doc/fontinst/base/encspecs/encspecs.tex +++ b/Master/texmf-dist/doc/fontinst/base/encspecs/encspecs.tex @@ -44,7 +44,21 @@ } \makeatother \DeclareRobustCommand\ETX{\textsmaller{ETX}} - +\DeclareRobustCommand\PDF{\textsmaller{PDF}} + +% From tugboat.cls +\def\thinskip{\hskip 0.16667em\relax} +\def\endash{--} +\def\emdash{\endash-} +\makeatletter +\def\d@sh#1#2{\unskip#1\thinskip#2\thinskip\ignorespaces} +\def\dash{\d@sh\nobreak\endash} +\def\Dash{\d@sh\nobreak\emdash} +\def\ldash{\d@sh\empty{\hbox{\endash}\nobreak}} +\def\rdash{\d@sh\nobreak\endash} +\def\Ldash{\d@sh\empty{\hbox{\emdash}\nobreak}} +\def\Rdash{\d@sh\nobreak\emdash} +\makeatother \usepackage{shortvrb} \MakeShortVerb{\|} @@ -79,6 +93,9 @@ \section{Introduction} +This is a kind of FAQ on some initial questions, and my personal +answers to those. + \paragraph*{Why should one specify font encodings?} Because without a specification, font designers\footnote{Maybe not a good term, since it is really about @@ -143,7 +160,11 @@ carries some meaning, even if you usually have to combine several characters to make up even one word---whereas a \emph{glyph} simply is a piece of graphics. In printed text, glyphs are used to represent characters and the first step of reading is to determine which -character(s) a given glyph is representing. +character(s) a given glyph is representing.\footnote{Some \PDF\ viewers +also try to accomplish this, but in general they need extra +information to do it right. The generic solution provided is to embed +a \emph{ToUnicode CMap}\Ldash which is precisely a map from slots to +characters\Rdash in the \PDF\ font object.} In the output, \TeX\ neither deals with characters nor glyphs, really (although many of its messages speak of characters), but with @@ -302,8 +323,8 @@ of |\lccode| values. In \eTeX\ each set of hyphenation patterns has its own set of |\lccode| values for hyphenation, so the problem isn't as severe there. The hyphenation mechanism of \TeXOmega\ should become -completely independent of the font encoding, but in the current -implementation it is still operating on material encoded according to +completely independent of the font encoding, although the last time I +checked it was still operating on material encoded according to a font encoding. @@ -416,10 +437,31 @@ this is to use the |\Unicode| command, which has the syntax \end{quote} The \meta{code point} is the number of the character (in hexadecimal notation, usually a four-digit number) and the \meta{name} is the name. -Case is insignificant in these arguments. If a character does not -have a Unicode code point then the specification should simply be a -description in text which identifies the character. Such descriptions -are written using the |\comment| command +Case is insignificant in these arguments. If a slot corresponds to a +string of characters rather than to a single character, then one uses +the |\charseq| command, which has the syntax +\begin{quote} + |\charseq|\marg{\cs{Unicode} commands} +\end{quote} +e.g. +\begin{quote}\begin{verbatim} +\nextslot{30} +\setslot{ffi} + \charseq{ + \Unicode{0066}{LATIN SMALL LETTER F} + \Unicode{0066}{LATIN SMALL LETTER F} + \Unicode{0069}{LATIN SMALL LETTER I} + } +\endsetslot +\end{verbatim}\end{quote} +Several |\Unicode| commands not in the argument of a |\charseq| +instead mean that each of the listed characters is a valid +interpretation of the slot. + +If a character cannot be specified in terms of Unicode code points then +the specification should simply be a description in text which +identifies the character. Such descriptions are written using the +|\comment| command \begin{quote} |\comment|\marg{text} \end{quote} @@ -444,8 +486,8 @@ ordinary and odd ligatures need not be. No clear distinction can be made between ordinary and odd ligatures, but a non-mandatory ligature should be categorized as ordinary if it makes sense for the majority of users, and as odd otherwise. Hence the `fi' ligature is -categorized as ordinary in the \texttt{T1} encoding, whereas the `ij' -ligature is odd. +categorized as ordinary in the \texttt{T1} encoding (although it +makes no sense in Turkish), whereas the `ij' ligature is odd. In the \ETX\ format, a ligature is specified using one of the slot commands @@ -885,15 +927,9 @@ so that they do match. \subsection{Encoding specification body syntax} The \meta{body} part of an encoding specification must comply to a -much stricter syntax than the rest of the file. -The full syntax of the \ETX\ format can\footnote{Well, it should be, -only the manual hasn't been updated for a while now, so some things -are missing from it. They're all documented in the \package{fontinst} -sources~\cite{fontinst-pre}, though.} be found in the \package{fontinst} -manual~\cite{fontinst-man}, but font encoding specifications only need -a subset of that. The \meta{body} is a sequence of -\meta{encoding command}s, each of which should be one of the -following: +much stricter syntax than the rest of the file. The \meta{body} is +a sequence of \meta{encoding command}s, each of which should be one +of the following: \begin{quote} |\setslot|\marg{glyph name} \meta{slots commands} |\endsetslot|\\ |\nextslot|\marg{number}\\ @@ -905,12 +941,13 @@ following: The |\needsfontinstversion| command is usually placed immediately after the |\encoding| command. The \meta{version number} must be at least |1.918| for many of the features described in this file to be -available. +available, and at least |1.928| if the |\charseq| command is used. The \meta{slot commands} are likewise a sequence of \meta{slot command}s, each of which should be one of the following: \begin{quote} |\Unicode|\marg{code point}\marg{name}\\ + |\charseq|\marg{\cs{Unicode} commands}\\ |\comment|\marg{text}\\ |\Ligature|\marg{ligtype}\marg{right}\marg{new}\\ |\ligature|\marg{ligtype}\marg{right}\marg{new}\\ @@ -941,6 +978,10 @@ the normal \LaTeX\ |\label| command; when it is used in a \meta{slot commands} it references that particular slot (by number and glyph name). +The full syntax of the \ETX\ format can be found in the +\package{fontinst} manual~\cite{fontinst-man}, but font encoding +specifications only need a subset of that. + \subsection{Additional \package{fontdoc} features} @@ -1257,7 +1298,7 @@ the above conditions reformulated. Alan Jeffrey, Sebastian Rahtz, Ulrik Vieth, and Lars Hellstr\"om: \textit{The \package{fontinst} utility}, documented source code, v\,1.9xx, - \ctanref{fonts/utilities/fontinst-prerelease/source}{% + \ctanref{fonts/utilities/fontinst/source}{% \textsc{ctan}:\discretionary{}{}{\thinspace}% \texttt{fonts}\slash \texttt{utilities}\slash \texttt{fontinst}\slash \texttt{source}/}. @@ -1266,7 +1307,7 @@ the above conditions reformulated. Ad\-di\-son--Wes\-ley, 1991; volume A of \textit{Computers and typesetting}. \bibitem{LaTeXCompanion} - Frank Mittelbac and Michel Goossens, with Johannes Braams, + Frank Mittelbach and Michel Goossens, with Johannes Braams, David Carlisle, and Chris Rowley: \textit{The \LaTeX\ Companion} (second edition), Ad\-di\-son--Wes\-ley, 2004; ISBN~0-201-36299-6. |