diff options
author | Hans Hagen <pragma@wxs.nl> | 2004-11-23 00:00:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2004-11-23 00:00:00 +0100 |
commit | e29b089d86c3cb25289ddb0fc7c98cf6c102b9ba (patch) | |
tree | cbf65265ce272f36d0099eca08692071e67570a8 /tex/context/base/spec-xtx.tex | |
parent | 3b8aa7e031c996ed051083984e5fa7078ec7cffd (diff) | |
download | context-e29b089d86c3cb25289ddb0fc7c98cf6c102b9ba.tar.gz |
stable 2004.11.23
Diffstat (limited to 'tex/context/base/spec-xtx.tex')
-rw-r--r-- | tex/context/base/spec-xtx.tex | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/tex/context/base/spec-xtx.tex b/tex/context/base/spec-xtx.tex index a8f0c0d48..576560203 100644 --- a/tex/context/base/spec-xtx.tex +++ b/tex/context/base/spec-xtx.tex @@ -149,4 +149,90 @@ \stopspecials +\protect + +%\endinput + +% FOR THE MOMENT HERE + +\ifx\dqfontquote\undefined \else \endinput \fi + +\unprotect + +% actually, we can use "" in pdftex> 1.20 as well + +\def\parsefontspec#1% + {\xdef\somefontspec{#1\space}% + \@EA\doparsefontspec\somefontspec\relax]% =>#1 \empty] + \donoparsefontspec} + +\def\doparsefontspec#1% + {\ifx"#1% + \@EA\dodqparsefontspec + \else\ifx'#1% + \@EAEAEA\dosqparsefontspec + \else + \@EAEAEA\dodoparsefontspec + \fi\fi#1} + +\def\dqfontquote{"} +\def\sqfontquote{'} + +\def\dodqparsefontspec"#1"#2% + {\def\somefontname{#1}% + \let\somefontquote\dqfontquote + \ifx#2\relax\@EA\setnaturalfontspec\else\@EA\setforcedfontspec\fi#2} + +\def\dosqparsefontspec'#1'#2% + {\def\somefontname{#1}% + \let\somefontquote\sqfontquote + \ifx#2\relax\@EA\setnaturalfontspec\else\@EA\setforcedfontspec\fi#2} + +\def\dodoparsefontspec#1 #2% + {\def\somefontname{#1}% + \let\somefontquote\empty + \ifx\somefontname\empty % space before fontname + \@EA\doparsefontspec + \else\ifx#2\relax + \@EAEAEA\setnaturalfontspec + \else + \@EAEAEA\setforcedfontspec + \fi\fi + #2} + +\def\setnaturalfontspec#1]% + {\@fs@scaled\plusthousand\relax} + +\def\setforcedfontspec#1 #2\relax]% + {\csname\@fs@#1\endcsname#2\relax} + +\beginXETEX \font + +\def\donoparsefontspec % #1 == \cs + {\edef\fontfile{\somefontquote\truefontname\somefontname\somefontquote}% + \ifx\fontfile\s!unknown \let\fontfile\defaultfontfile \fi + \edef\lastfontname{\fontfile\somefontspec}% + \ifx\fontclass\empty + \expandafter\definefontlocal + \else + \expandafter\definefontglobal + \fi} % #1 == \cs + +\endXETEX + \protect \endinput + +\starttext + +\definedfont[{cmr10} at 40pt] test +\definedfont['cmss10' at 40pt] test +\definedfont["cmtt10" at 40pt] test + +\definedfont[{cmr10} at 40pt] test +\definedfont['cmss10' at 40pt] test +\definedfont["cmtt10" at 40pt] test + +% \definedfont["Gentium" at 40pt] test + +\stoptext + |