summaryrefslogtreecommitdiff
path: root/tex/context/base/font-ini.mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2007-08-07 01:37:00 +0200
committerHans Hagen <pragma@wxs.nl>2007-08-07 01:37:00 +0200
commitaacdde41ef02392949aee16b2e428a8913d27efe (patch)
tree1ca125418e41b0335ee115a24cf27acb8fa7eae9 /tex/context/base/font-ini.mkiv
parentdbcaab8b8f76309b9fc4e05bf8a42f6b56e61893 (diff)
downloadcontext-aacdde41ef02392949aee16b2e428a8913d27efe.tar.gz
stable 2007.08.07 01:37
Diffstat (limited to 'tex/context/base/font-ini.mkiv')
-rw-r--r--tex/context/base/font-ini.mkiv72
1 files changed, 72 insertions, 0 deletions
diff --git a/tex/context/base/font-ini.mkiv b/tex/context/base/font-ini.mkiv
new file mode 100644
index 000000000..dd597d41f
--- /dev/null
+++ b/tex/context/base/font-ini.mkiv
@@ -0,0 +1,72 @@
+%D \module
+%D [ file=font-ini,
+%D version=2007.01.10,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Initialization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\registerctxluafile{font-ini}{1.001}
+\registerctxluafile{font-enc}{1.001}
+\registerctxluafile{font-map}{1.001}
+\registerctxluafile{font-syn}{1.001}
+\registerctxluafile{font-tfm}{1.001}
+\registerctxluafile{font-afm}{1.001}
+\registerctxluafile{font-otf}{1.001}
+\registerctxluafile{font-vf} {1.001}
+\registerctxluafile{font-def}{1.001}
+\registerctxluafile{font-fbk}{1.001}
+
+\unprotect
+
+\def\mkdefinefontfeature#1#2%
+ {\ctxlua{fonts.define.specify.preset_context("#1","#2")}}
+
+% handy for manuals
+
+\def\otfchar#1{\ctxlua{fonts.otf.char("#1")}}
+
+\registerrgbcolor {font:init} {1}{0}{0}%
+\registerrgbcolor {font:medi} {0}{1}{0}%
+\registerrgbcolor {font:fina} {0}{0}{1}%
+\registerrgbcolor {font:isol} {0}{1}{1}%
+\registerrgbcolor {font:mark} {1}{0}{1}%
+\registerrgbcolor {font:rest} {1}{1}{0}%
+
+%D goodies:
+%D
+%D \starttyping
+%D \showinstalledfonts[officinasans.*][all]
+%D \showinstalledfonts[officinaserif.*][all]
+%D \showinstalledfonts[officina.*itc.*][all]
+%D
+%D \showinstalledfonts[officina.*itc.*][all,new]
+%D \stoptyping
+
+\def\showinstalledfonts
+ {\dodoubleempty\doshowinstalledfonts}
+
+\def\doshowinstalledfonts[#1][#2]%
+ {\bgroup
+ \def\pattern{#1}%
+ \def\all{false}%
+ \def\reload{false}%
+ \doifnothing\pattern{\def\pattern{.*}}%
+ \processallactionsinset[#2][\v!new=>\def\reload{true},\v!all=>\def\all{true}]%
+ \ctxlua{fonts.names.table("#1",\reload,\all)}%
+ \egroup}
+
+%D Experimental!
+
+\def\installfontfeature
+ {\dodoubleargument\doinstallfontfeature}
+
+\def\doinstallfontfeature[#1][#2]%
+ {\ctxlua{fonts.install_feature("#1","#2")}}
+
+\protect \endinput