summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-05-10 21:27:39 +0000
committerKarl Berry <karl@freefriends.org>2016-05-10 21:27:39 +0000
commit55d9827b710e8c945cd35bd1efec973bf7d53698 (patch)
tree9be15d5c8467f80ebd34af52c842bae1111cc917
parent18e100730bd2e086a899a55f7423e028f07e90b9 (diff)
csplain (10may16)
git-svn-id: svn://tug.org/texlive/trunk@41009 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/tex/csplain/base/csplain.ini2
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-heros.tex51
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-polta.tex5
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/exchars.tex18
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/ff-mac.tex9
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/kp-fonts.tex2
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/lmfonts.tex42
-rw-r--r--Master/texmf-dist/tex/csplain/opmac/fontfam-global.tex2
8 files changed, 91 insertions, 40 deletions
diff --git a/Master/texmf-dist/tex/csplain/base/csplain.ini b/Master/texmf-dist/tex/csplain/base/csplain.ini
index 8c7dda62e7d..0c35d243218 100644
--- a/Master/texmf-dist/tex/csplain/base/csplain.ini
+++ b/Master/texmf-dist/tex/csplain/base/csplain.ini
@@ -253,6 +253,8 @@ file extcode.tex renamed to il2code.tex (suggested by Jan Kasprzak)
May 2016:
* ctimes.tex etc. font-files rewritten based on ff-mac.tex
+* lmfonts.tex rewritten based on ff-mac.tex
+* exchars.tex: \tgexchars introduced, \edef used in \setexfont
COPYRIGHT
=========
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-heros.tex b/Master/texmf-dist/tex/csplain/fonts/cs-heros.tex
index 58e1468e00b..e6a9cdb7841 100644
--- a/Master/texmf-dist/tex/csplain/fonts/cs-heros.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-heros.tex
@@ -344,3 +344,54 @@ in \write file. After the data are read from file again, they do exactly
what we need. But if the \modfoo is protected, then \modfoo\it is expanded
into \write file like \modfoo\fam\itfam\tenit and this is bad.
+
+\ffloadhookA,B -- substitutions on demand
+-----------------------------------------
+
+The font loading process can be illustrated by the following pseudocode:
+
+\if \ffvarV=! \ffwarning{string of selected variant}%
+\else
+ \let\ffopptV=\empty
+ % now we can expand \ffnamegen wich represents selected shape
+ \ffloadhookA\iftrue
+ font-name := \ffnamegen
+ \if was declared \ffalias{font-name}{real-name}
+ font-name := real-name
+ \fi
+ \if font-name is declared by \regtfm
+ \if \dgsize is defined
+ dg-size := \dgsize
+ \else
+ dg-size := 10pt
+ \fi
+ \if \sizespec is in the "at<dimen>" form
+ read dg-size from \sizespec
+ \fi
+ select font-name from \regtfm data with given dg-size
+ \fi
+ \ffloadhookB
+ \font \f = font-name \sizespec
+ where \f is \tenrm or \tenbf or \tebit or \tenbi or \ffmodfont
+ \fi
+\fi
+
+The \ffloadhookA and \ffloadhookB are set to empty by default. But you can
+define it for testing of availability of given \ffnamegen (see kp-fonts.tex
+or lmfonts.tex for an example). Note that \ffloadhookA macro from mentioned
+files consumes the following \iftrue and executes the font process only if
+\ffnamegen is validated.
+
+The substitution can be done in \ffloadhookA on demand, for example:
+
+\def\ffloadhookB{%
+ % ... here we know the actual \ffnamegen and we can do:
+ \if... \ffnamegen is not available then
+ \ffalias{\ffnamegen}{something-available}%
+ \fi
+}
+
+The extra font metrix (TS1) can be loaded on demand vis \ffloadhookB,
+see exchars.tex
+
+------------------------------------------------------------------
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-polta.tex b/Master/texmf-dist/tex/csplain/fonts/cs-polta.tex
index 424aeb3d92e..18a0d5be3db 100644
--- a/Master/texmf-dist/tex/csplain/fonts/cs-polta.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-polta.tex
@@ -49,9 +49,8 @@
\ffvars {regular} {bold} {italic} {bolditalic}
\def\wlight{\ffsetV{wli}{lt}\ffsetX}
\def\nowlight{\ffsetV{wli}{}\ffsetX}
- \def\caps{\ffsetV{caps}{;+smcp}\ffsetX}
- \expandafter\def\expandafter\fontfeatures\expandafter{\fontfeatures\capsV}
- \def\nocaps{\ffsetV{caps}{}\ffsetX}
+ \def\caps{\useff{+smcp}}
+ \def\nocaps{\useff{-smcp}}
\def\wliV{}
\regsizes {} {0 =expd 7 =semiexpd 9 ={} 11 =semicond 14 =cond}
diff --git a/Master/texmf-dist/tex/csplain/fonts/exchars.tex b/Master/texmf-dist/tex/csplain/fonts/exchars.tex
index 19ea8daacde..84674f7528d 100644
--- a/Master/texmf-dist/tex/csplain/fonts/exchars.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/exchars.tex
@@ -32,7 +32,7 @@
\def\separethefont#1 #2\relax{\def\tmpa{#1}\def\tmpb{#2}}
\def\excharblackbox #1#2#3%
{\leavevmode\kern.05em\vrule height.5em width.5em depth0pt\kern.05em }
-\def\setexfont #1 #2 #3 {\expandafter\def\csname ex:#1/#2\endcsname{#3}}
+\def\setexfont #1 #2 #3 {\expandafter\edef\csname ex:#1/#2\endcsname{#3}}
% Fonts declarations:
@@ -67,6 +67,7 @@
\declexfamily pplr8t Palatino {\setexfamilyA ppl qpl r b ri bi 8t 8t }
\def\setexfamilyB #1 #2 #3 #4 #5 #6 {%
+ \def\ffloadhookB{\tgexchars}% modifiers from ff-mac.tex on demand
\setexfont #6-#1#2 TS1 ts1-#1#2
\setexfont #6-#1#3 TS1 ts1-#1#3
\setexfont #6-#1#4 TS1 ts1-#1#4
@@ -87,12 +88,15 @@
\declexfamily ec-qplr Schola {\setexfamilyB qpl r b ri bi ec }
\declexfamily ec-qcrr Cursor {\setexfamilyB qcr r b ri bi ec }
-\declexfamily cs-lmr10 LatinModern {%
- \setexfamilyB lm r10 bx10 ri10 bxi10 cs
- \setexfamilyB lm tt10 csc10 csco10 ss10 cs }
-\declexfamily ec-lmr10 LatinModern {%
- \setexfamilyB lm r10 bx10 ri10 bxi10 ec
- \setexfamilyB lm tt10 csc10 csco10 ss10 ec }
+\declexfamily cs-lmr10 LMfonts {\setexfamilyB lm r10 bx10 ri10 bxi10 cs }
+\declexfamily ec-lmr10 LMfonts {\setexfamilyB lm r10 bx10 ri10 bxi10 ec }
+\declexfamily qx-lmr10 LMfonts {\setexfamilyB lm r10 bx10 ri10 bxi10 qx }
+\declexfamily texansi-lmr10 LMfonts {\setexfamilyB lm r10 bx10 ri10 bxi10 texansi }
+\declexfamily t5-lmr10 LMfonts {\setexfamilyB lm r10 bx10 ri10 bxi10 t5 }
+
+\def\tgexchars{\edef\tmp{\whichtfm{\ffnamegen}}% % declare exfont of optical
+ \expandafter\tgexcharsA\tmp\empty-\empty\relax} % sizes and modifiers on demand
+\def\tgexcharsA#1-#2\empty#3\relax{\setexfont{\tmp} TS1 ts1-#2 }
\def\tmp{%
\setexfont csr8 TS1 ts1-lmr8
diff --git a/Master/texmf-dist/tex/csplain/fonts/ff-mac.tex b/Master/texmf-dist/tex/csplain/fonts/ff-mac.tex
index f94ab631f59..a96ef09427d 100644
--- a/Master/texmf-dist/tex/csplain/fonts/ff-mac.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/ff-mac.tex
@@ -76,15 +76,16 @@
\fi\fi\fi
}
\def\ffsetF#1#2{%
- \ffnametest\iftrue
+ \ffloadhookA\iftrue
\ifx\dgsize\undefined
\expandafter\readsizespec\sizespec at\relax
- \font#1=\whichtfm{\ffnamegen} \sizespec\relax
+ \ffloadhookB \font#1=\whichtfm{\ffnamegen} \sizespec\relax
\let\dgsize=\undefined
- \else \font#1=\whichtfm{\ffnamegen} \sizespec\relax
+ \else \ffloadhookB \font#1=\whichtfm{\ffnamegen} \sizespec\relax
\fi #2\fi
}
-\let\ffnametest=\relax
+\def\ffloadhookA{}
+\def\ffloadhookB{}
\def\ffwarning#1{}
\def\ffsetS{\expandafter\ifx\the\font\tenrm \def\ffvarN{0}%
diff --git a/Master/texmf-dist/tex/csplain/fonts/kp-fonts.tex b/Master/texmf-dist/tex/csplain/fonts/kp-fonts.tex
index ad2ef2c6f04..8c838ccd296 100644
--- a/Master/texmf-dist/tex/csplain/fonts/kp-fonts.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/kp-fonts.tex
@@ -91,7 +91,7 @@
\let\euro=\exeuro
\ifx\mubyte\undefined \else \mubyte\euro ^^e2^^82^^ac\endmubyte \fi
-\def\ffnametest#1{% if desired metric is not registered then print warning
+\def\ffloadhookA#1{% if desired metric is not registered then print warning
\expandafter\ifx\csname ex:\ffnamegen/TS1\endcsname \relax
\ffmessage{FONT warning: KPfonts - subfam="\subfamV" wlight="\wlightV"
bcaps="\bcapsV", noflig="\nofligV", old="\oldV", bext="\bextV" of
diff --git a/Master/texmf-dist/tex/csplain/fonts/lmfonts.tex b/Master/texmf-dist/tex/csplain/fonts/lmfonts.tex
index c77b1772187..9bd3c1d6b97 100644
--- a/Master/texmf-dist/tex/csplain/fonts/lmfonts.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/lmfonts.tex
@@ -7,7 +7,7 @@
\ffdecl [Latin Modern] {\rm \bf \it \bi}
{\caps \sans \ttset \slant \nbold \ttprop \ttlight \ttcond
\quotset \upital \dunhill}
- {} {AMS} {8z 8t U}
+ {} {AMS} {8t 8z 8q 8y 8v U}
% \lmreset ... implicit values (serif, bod extended, nocaps)
% \sans ...... sans serif subfamily
@@ -22,24 +22,12 @@
% \slant ..... slanted (default in some subfamilies)
% \nbold ..... normal bold (no extended)
-\ismacro\fotenc{8t}\iftrue
- \font\tenrm = ec-lmr10 \sizespec
- \font\tenbf = ec-lmbx10 \sizespec
- \font\tenit = ec-lmri10 \sizespec
- \font\tenbi = ec-lmbxi10 \sizespec
- \font\tentt = ec-lmtt10 \sizespec
- \font\tenrmc= ec-lmcsc10 \sizespec % for backward compatibility
- \font\tenitc= ec-lmcsco10 \sizespec % for backward compatibility
-\fi
-\ismacro\fotenc{8z}\iftrue
- \font\tenrm = cs-lmr10 \sizespec
- \font\tenbf = cs-lmbx10 \sizespec
- \font\tenit = cs-lmri10 \sizespec
- \font\tenbi = cs-lmbxi10 \sizespec
- \font\tentt = cs-lmtt10 \sizespec
- \font\tenrmc= cs-lmcsc10 \sizespec % for backward compatibility
- \font\tenitc= cs-lmcsco10 \sizespec % for backward compatibility
-\fi
+\ismacro\fotenc{8t}\iftrue \def\ffnamepre{ec-}\fi % T1 aka Cork
+\ismacro\fotenc{8z}\iftrue \def\ffnamepre{cs-}\fi % IL2 aka CSfont
+\ismacro\fotenc{8q}\iftrue \def\ffnamepre{qx-}\fi % QX GUST, Polish
+\ismacro\fotenc{8y}\iftrue \def\ffnamepre{texansi-}\fi % Y&Y
+\ismacro\fotenc{8v}\iftrue \def\ffnamepre{t5-}\fi % Vietnamese
+
\ismacro\fotenc{U}\iftrue
\font\tenrm = "[lmroman10-regular]:\fontfeatures" \sizespec
\font\tenbf = "[lmroman10-bold]:\fontfeatures" \sizespec
@@ -48,7 +36,16 @@
\font\tentt = "[lmmono10-regular]:\fontfeatures" \sizespec
\font\tenrmc= "[lmromancaps10-regular]:\fontfeatures" \sizespec
\font\tenitc= "[lmromancaps10-oblique]:\fontfeatures" \sizespec
+\else
+ \font\tenrm = \ffnamepre lmr10 \sizespec
+ \font\tenbf = \ffnamepre lmbx10 \sizespec
+ \font\tenit = \ffnamepre lmri10 \sizespec
+ \font\tenbi = \ffnamepre lmbxi10 \sizespec
+ \font\tentt = \ffnamepre lmtt10 \sizespec
+ \font\tenrmc= \ffnamepre lmcsc10 \sizespec % for backward compatibility
+ \font\tenitc= \ffnamepre lmcsco10 \sizespec % for backward compatibility
\fi
+\ismacro\fotenc{8z}\iftrue \input chars-8z \fi
\tenrm
\ffvars{\regularV}{b\bextV}{ti\slantV}{b\bextV i\slantV}
@@ -70,9 +67,9 @@
\def\ffnamegen{lm\subfamV\ffvarV\capsV\ffoptV}
-\def\ffnametest#1{\expandafter\ifx \csname\ffnamegen:reg\endcsname \relax
+\def\ffloadhookA#1{\expandafter\ifx \csname\ffnamegen:reg\endcsname \relax
\ffmessage{FONT warning: LMfonts - desired shape (\ffnamegen) unavailable}%
- \else % font is loaded
+ \else % TS1 metric added + load font
}
\def\LMregtfm #1 #2 #3 #4 {\edef\tmp
{\noexpand\regtfm #1 0 \csname regtfm#3\endcsname\ffnamepre{#2}}%
@@ -88,9 +85,6 @@
\def\regtfmT #1#2{#1#210 *}
\def\regtfmE #1#2{#1#28 *}
-\ismacro\fotenc{8t}\iftrue \def\ffnamepre{ec-}\fi
-\ismacro\fotenc{8z}\iftrue \def\ffnamepre{cs-}\fi
-
\ismacro\fotenc{U}\iftrue
\def\ffnamepre#1-#2;#3 {\noexpand\ffnameotf{[#1#3-#2]} }
\let\ffnameotf=\ffnameotfA
diff --git a/Master/texmf-dist/tex/csplain/opmac/fontfam-global.tex b/Master/texmf-dist/tex/csplain/opmac/fontfam-global.tex
index 95093f6db2f..55f800f9ab5 100644
--- a/Master/texmf-dist/tex/csplain/opmac/fontfam-global.tex
+++ b/Master/texmf-dist/tex/csplain/opmac/fontfam-global.tex
@@ -2,7 +2,7 @@
\fontfamnote {Fonts derived from Computer Modern}
\setfontfam [LM fonts] {\rm \it \bf \bi}
{\caps \sans \ttset \slant \nbold \ttprop \ttlight \ttcond \quotset \upital \dunhill}
- {} {AMS} (8t 8z U) {\input lmfonts}
+ {} {AMS} (8t 8z 8q 8y 8v U) {\input lmfonts}
\famalias{latinmodern}{lmfonts} \famalias{lmfont}{lmfonts}
\famalias{latinmodernfonts}{lmfonts} \famalias{latinmodern}{lmfonts}