diff options
author | Karl Berry <karl@freefriends.org> | 2008-06-19 00:07:51 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-06-19 00:07:51 +0000 |
commit | 89bae23c0f3eecdab79cf863ed1af87a05441a12 (patch) | |
tree | 69e58c6180bb02b2786025bd5853fa0dd33c2416 /Master | |
parent | 1df51b7e7e4ab51cc9567313e580188d179b6e43 (diff) |
new xetexfontinfo (18jun08)
git-svn-id: svn://tug.org/texlive/trunk@8859 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/xetex/xetexfontinfo/README | 16 | ||||
-rw-r--r-- | Master/texmf-dist/tex/xetex/xetexfontinfo/AAT-info.tex | 123 | ||||
-rw-r--r-- | Master/texmf-dist/tex/xetex/xetexfontinfo/OpenType-info.tex | 93 | ||||
-rwxr-xr-x | Master/tlpkg/bin/ctan2tds | 3 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkg-ctan-check | 3 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkginfo | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/xetexfontinfo.tlpsrc | 2 |
7 files changed, 240 insertions, 2 deletions
diff --git a/Master/texmf-dist/doc/xetex/xetexfontinfo/README b/Master/texmf-dist/doc/xetex/xetexfontinfo/README new file mode 100644 index 00000000000..fadc827f4ec --- /dev/null +++ b/Master/texmf-dist/doc/xetex/xetexfontinfo/README @@ -0,0 +1,16 @@ +__________________________ + OpenType-info & AAT-info + By Jonathan Kew + +These documents are used to reveal the various +font features supported by fonts useable in XeTeX. + +Use OpenType-info.tex for OpenType fonts and +AAT-info.tex for AAT fonts (Mac OS X only). + +Input the font name and compile them with plain +`xetex`; the output will be a listing of the +supported font features. + +These documents are distributed under the Apache License v2: + <http://www.apache.org/licenses/LICENSE-2.0.html> diff --git a/Master/texmf-dist/tex/xetex/xetexfontinfo/AAT-info.tex b/Master/texmf-dist/tex/xetex/xetexfontinfo/AAT-info.tex new file mode 100644 index 00000000000..e0ae839348e --- /dev/null +++ b/Master/texmf-dist/tex/xetex/xetexfontinfo/AAT-info.tex @@ -0,0 +1,123 @@ +%%% AAT-info.tex %%% +% By Jonathan Kew +% +% Prints XeTeX font features for a font +% using the "AAT" renderer of XeTeX; +% requires Mac OS X. +% +% See OpenType-info.tex for the equivalent +% functionality for OpenType fonts. +% +% Usage: +% Type the name of the font below and compile this +% document with plain `xetex` to receive a listing +% of the AAT font features supported by the chosen font. +% +% AAT-info is distributed under the Apache License v2: +% <http://www.apache.org/licenses/LICENSE-2.0.html> +% +%%%%%%%%%%%%%%%%%%%% +% +% Select the font name: +\def\myfontname{Hoefler Text} +% +%%% AAT-info.tex %%% + + +\font\testfont="\myfontname" at 10pt +\nopagenumbers + +\baselineskip=14pt +\font\tenrm="Lucida Grande" at 10pt \tenrm +\font\title="Lucida Grande Bold" at 12pt + +\font\sym="Apple Symbols" at 11pt +\def\radioOff{{\sym ^^^^25cb}} +\def\radioOn{{\sym ^^^^25c9}} +\def\checkOff{{\sym ^^^^2610}} +\def\checkOn{{\sym ^^^^2612}} + +\newcount\nf +\newcount\f \newcount\fc +\newcount\ns +\newcount\s \newcount\sc +\nf=\XeTeXcountfeatures\testfont +\noindent {\title AAT features in ‘\myfontname’}\nobreak\medskip +\ifnum\nf>0 + \loop + \fc=\XeTeXfeaturecode\testfont\f + \noindent \XeTeXfeaturename\testfont\fc\ [\number\fc] + \endgraf + \ns=\XeTeXcountselectors\testfont\fc + { + \loop + \sc=\XeTeXselectorcode\testfont\fc\s + \textindent{% + \ifnum\XeTeXisexclusivefeature\testfont\fc>0 + \ifnum\XeTeXisdefaultselector\testfont\fc\sc>0 \radioOn \else \radioOff \fi + \else + \ifnum\XeTeXisdefaultselector\testfont\fc\sc>0 \checkOn \else \checkOff \fi + \fi + }\XeTeXselectorname\testfont\fc\sc\ [\number\sc] + \endgraf + \advance\s by 1 \ifnum\s<\ns \repeat + } + \smallskip + \advance\f by 1 \ifnum\f<\nf \repeat +\else + \noindent {No AAT features available}\par +\fi + +\bigskip + +\newcount\val +\def\appendint{\count255=\val \divide\count255 by 65536 + \edef\decval{\decval\number\count255}\multiply\count255 by 65536 + \advance\val by -\count255 } +\def\decimalize#1{\val=#1 \def\decval{}\appendint \edef\decval{\decval.}% + \multiply\val by 10 \appendint \multiply\val by 10 \appendint + \multiply\val by 10 \appendint \multiply\val by 10 \appendint + \multiply\val by 10 \appendint \multiply\val by 10 \appendint} +\def\decnum{\afterassignment\printdec \count255=} +\def\printdec{\dimen255=\count255 sp \expandafter\noPT\the\dimen255 } +{\catcode`\p=12 \catcode`\t=12 \gdef\noPT#1pt{#1}} +\newcount\nv +\newcount\v \newcount\vc +\nv=\XeTeXcountvariations\testfont +\noindent {\title AAT variation axes in \myfontname:}\nobreak\medskip +\ifnum\nv>0 + \loop + \vc=\XeTeXvariation\testfont\v + \noindent \XeTeXvariationname\testfont\vc + \endgraf + \indent Range:\ + {\decimalize{\XeTeXvariationmin\testfont\vc}% + \font\x="\myfontname:\XeTeXvariationname\testfont\vc=\decval" at 10pt + \x min \decnum\XeTeXvariationmin\testfont\vc}% + \ …\ + {\decimalize{\XeTeXvariationmax\testfont\vc}% + \font\x="\myfontname:\XeTeXvariationname\testfont\vc=\decval" at 10pt + \x max \decnum\XeTeXvariationmax\testfont\vc}% + \ \ + {\font\x="\myfontname" at 10pt + \x (default:\ \decnum\XeTeXvariationdefault\testfont\vc)}% + \endgraf + \smallskip + \advance\v by 1 \ifnum\v<\nv \repeat +\else + \noindent {No AAT variations available}\par +\fi + +\bigskip + +\newcount\ng +\newcount\g \newcount\step +\ng=\XeTeXcountglyphs\testfont +\noindent{\title \myfontname\ contains \number\ng\ glyphs} +\nobreak\medskip +\step=\ng \divide\step by 25 +\noindent + \loop \advance\g by \step + \ifnum\g<\ng {\testfont\XeTeXglyph\g} \repeat + +\end diff --git a/Master/texmf-dist/tex/xetex/xetexfontinfo/OpenType-info.tex b/Master/texmf-dist/tex/xetex/xetexfontinfo/OpenType-info.tex new file mode 100644 index 00000000000..8aea6e4d992 --- /dev/null +++ b/Master/texmf-dist/tex/xetex/xetexfontinfo/OpenType-info.tex @@ -0,0 +1,93 @@ +%%% OpenType-info.tex %%% +% By Jonathan Kew +% +% Prints XeTeX font features for an +% OpenType font using the "ICU" renderer of XeTeX. +% +% Usage: +% Type the name of the font below and compile this +% document with plain `xetex` to receive a listing +% of the OpenType font features, languages & scripts +% supported by the chosen font. +% +% OpenType-info is distributed under the Apache License v2: +% <http://www.apache.org/licenses/LICENSE-2.0.html> +% +%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Select the font name: +\def\myfontname{Latin Modern Roman} +% +%%% OpenType-info.tex %%% + + +\nopagenumbers \rightskip=0pt plus 1fil +\font\testfont="\myfontname" at 12pt +\font\title=ec-lmssbx10 at 14pt +\font\tenrm=ec-lmss10 at 10pt \tenrm +\font\tentt=ec-lmtt10 at 10pt + +\def\fourcharcode#1{\begingroup + \count0=#1\count1=\count0 + \ifnum\count0=0 + $\langle$default$\rangle$% + \else + \tentt + '% + \divide\count0 by "1000000 + \char\count0 + \multiply\count0 by "1000000 + \advance\count1 by -\count0 + \count0=\count1 + \divide\count0 by "10000 + \char\count0 + \multiply\count0 by "10000 + \advance\count1 by -\count0 + \count0=\count1 + \divide\count0 by "100 + \char\count0 + \multiply\count0 by "100 + \advance\count1 by -\count0 + \ifnum\count1=32 \ \else \char\count1 \fi + '% + \fi + \endgroup +} + +\newcount\scriptcount +\newcount\scriptindex +\newcount\scripttag +\newcount\langcount +\newcount\langindex +\newcount\langtag +\newcount\featurecount +\newcount\featureindex +\newcount\featuretag + +\leftline{\title OpenType Layout features found in `\myfontname'} +\nobreak\bigskip + +\scriptcount=\XeTeXOTcountscripts\testfont +\ifnum\scriptcount=0 \noindent None\par\fi + +\loop + \ifnum\scriptindex<\scriptcount + \scripttag=\XeTeXOTscripttag\testfont\scriptindex + \noindent script = \fourcharcode{\scripttag}\endgraf\nobreak + \langcount=\XeTeXOTcountlanguages\testfont\scripttag + \advance\langcount by 1 % one extra to get the default language system + {\loop + \langtag=\XeTeXOTlanguagetag\testfont\scripttag\langindex + \indent language = \fourcharcode{\langtag}\endgraf\nobreak + \featurecount=\XeTeXOTcountfeatures\testfont\scripttag\langtag + {\indent\indent \hangindent=3\parindent \hangafter=1 features = \loop + \featuretag=\XeTeXOTfeaturetag\testfont\scripttag\langtag\featureindex + \fourcharcode{\featuretag} + \advance\featureindex by 1 + \ifnum\featureindex<\featurecount \repeat\endgraf} + \advance\langindex by 1 + \ifnum\langindex<\langcount \medskip \repeat} + \advance\scriptindex by 1 + \bigskip \repeat + +\bye diff --git a/Master/tlpkg/bin/ctan2tds b/Master/tlpkg/bin/ctan2tds index 79dcc805465..c26c9292ec3 100755 --- a/Master/tlpkg/bin/ctan2tds +++ b/Master/tlpkg/bin/ctan2tds @@ -637,6 +637,7 @@ $standardsourcefmt='latex'; 'variations', 'generic', 'vertex', 'plain', 'wasy2', 'plain', + 'xetexfontinfo','xetex', 'xltxtra', 'xelatex', 'xmlplay', 'xmltex', 'xunicode', 'xelatex', @@ -757,6 +758,7 @@ $standardfmt='latex'; 'vertex', 'plain', 'voss-de', 'german', 'wasy2', 'fonts', + 'xetexfontinfo','xetex', 'xltxtra', 'xelatex', 'xq', 'fonts', 'xunicode', 'xelatex', @@ -928,6 +930,7 @@ $standardtex='\.cfg|\.sty|\.clo|\.ldf|\.cls|\.def|\.fd$|\.cmap'; 'vhistory', '\.sty', # not hyperref.cfg 'wasy2', 'wasyfont\.tex', 'wordcount', '\.tex', + 'xetexfontinfo','\.tex', 'zefonts', '\.sty|\.fd', ); diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 5c81ad46cce..2d3e06e27f7 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -200,7 +200,8 @@ my @WorkingTLP = qw( vector velthuis venn verse versions vertex vhistory visualfaq vmargin vntex volumes vpe vxu wallpaper warning warpcol williams wordlike wrapfig - xargs xbase xcolor xdoc xecyr xetexref xfor xgreek xifthen + xargs xbase xcolor xdoc xecyr xetexfontinfo xetexref xfor xgreek + xifthen xkeyval xltxtra xmpincl xnewcommand xoptarg xq xskak xtab xtcapts xunicode xyling xypic-tut-pt xytree york-thesis diff --git a/Master/tlpkg/bin/tlpkginfo b/Master/tlpkg/bin/tlpkginfo index 022f65ca897..1e51710cec1 100755 --- a/Master/tlpkg/bin/tlpkginfo +++ b/Master/tlpkg/bin/tlpkginfo @@ -23,7 +23,7 @@ sub main $latex_tds_dir = "$CTAN/macros/latex/contrib/latex-tds"; # erroneous tds files (warn Robin about them) - $erroneous_tds = "lcyw"; # list format: pkg1|pkg2|etc + $erroneous_tds = "lcyw|xetexfontinfo"; # list format: pkg1|pkg2|etc if ($ARGV[0] eq "--ctan-dir") { my $output = &find_ctan_dir ($ARGV[1]); diff --git a/Master/tlpkg/tlpsrc/xetexfontinfo.tlpsrc b/Master/tlpkg/tlpsrc/xetexfontinfo.tlpsrc new file mode 100644 index 00000000000..e7d089dc48d --- /dev/null +++ b/Master/tlpkg/tlpsrc/xetexfontinfo.tlpsrc @@ -0,0 +1,2 @@ +name xetexfontinfo +category Package |