diff options
author | Marius <mariausol@gmail.com> | 2012-10-19 01:20:13 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2012-10-19 01:20:13 +0300 |
commit | 69d2352af4b60929b37fc49f3bdb263977016244 (patch) | |
tree | db5eb11398e345dfa23b4c4500fb93575d2afb7c /tex/context/base/font-tra.mkiv | |
parent | c18f7cbe51449a611ea1819fedd9a4ff18529b7d (diff) | |
download | context-69d2352af4b60929b37fc49f3bdb263977016244.tar.gz |
stable 2012.05.30 11:26
Diffstat (limited to 'tex/context/base/font-tra.mkiv')
-rw-r--r-- | tex/context/base/font-tra.mkiv | 46 |
1 files changed, 18 insertions, 28 deletions
diff --git a/tex/context/base/font-tra.mkiv b/tex/context/base/font-tra.mkiv index e838d4938..06b861378 100644 --- a/tex/context/base/font-tra.mkiv +++ b/tex/context/base/font-tra.mkiv @@ -13,8 +13,6 @@ \unprotect -\writestatus{loading}{ConTeXt Font Macros / Tracing} - %D \macros %D {showbodyfont} %D @@ -84,8 +82,10 @@ \fetchruntimecommand \showcharratio {\f!fontprefix\s!run} \fetchruntimecommand \showfontparameters {\f!fontprefix\s!run} -\unexpanded\def\showchardata #1{\ctxcommand{showchardata("#1")}} -\unexpanded\def\showfontdata {\ctxcommand{showfontparameters()}} +\unexpanded\def\checkcharactersinfont {\ctxcommand{checkcharactersinfont()}} +\unexpanded\def\removemissingcharacters{\ctxcommand{removemissingcharacters()}} +\unexpanded\def\showchardata #1{\ctxcommand{showchardata("#1")}} +\unexpanded\def\showfontdata {\ctxcommand{showfontparameters()}} %D \macros %D {doiffontpresentelse} @@ -95,7 +95,7 @@ %D \doiffontpresentelse{adam-lindsay-modern-serif}{YES}{NO} %D \stoptyping -\unexpanded\def\doiffontpresentelse#1{\ctxcommand{doifelse(fonts.names.exists("#1"))}} +\def\doiffontpresentelse#1{\ctxcommand{doifelse(fonts.names.exists("#1"))}} % experimental, maybe this becomes a module @@ -103,46 +103,46 @@ \unexpanded\def\startotfcollecting{\ctxlua{nodes.tracers.steppers.start()}} \unexpanded\def\stopotfcollecting {\ctxlua{nodes.tracers.steppers.stop()}} -\unexpanded\def\resetotfcollecting{\ctxlua{nodes.tracers.steppers.reset()}} +\def\resetotfcollecting{\ctxlua{nodes.tracers.steppers.reset()}} % Rather experimental: % % \page \showotfcomposition{arabtype*arab-default at 48pt}{-1}{الضَّرَّ} \page % \page \showotfcomposition{arabtype*arab-default at 48pt}{-1}{لِلّٰهِ} \page -\unexpanded\def\showotfstepglyphs#1% +\def\showotfstepglyphs#1% {\ctxlua{nodes.tracers.steppers.glyphs(\number\otfcollector,#1)}% \unhbox\otfcollector} -\unexpanded\def\otfstepcharcommand#1#2#3% font char class +\def\otfstepcharcommand#1#2#3% font char class {\removeunwantedspaces - \hskip.5\emwidth \s!plus .125\emwidth\relax + \hskip.5em plus .125em\relax \doif{#3}{mark}{\underbar}{U+\hexnumber{#2}}:\ruledhbox{\ctxlua{nodes.tracers.fontchar(#1,#2)}}% - \hskip.5\emwidth \s!plus .125\emwidth\relax} + \hskip.5em plus .125em\relax} -\unexpanded\def\otfstepmessagecommand#1#2% +\def\otfstepmessagecommand#1#2% {\begingroup \tttf\language\minusone \veryraggedright \forgetparindent \forgeteverypar - \hangindent\emwidth + \hangindent1em \hangafter\plusone \dontleavehmode\hbox{\detokenize{#1}}\removeunwantedspaces \doifsomething{#2}{\break\detokenize{#2}}\endgraf \endgroup \blank} -\unexpanded\def\showotfstepchars#1% +\def\showotfstepchars#1% {\ctxlua{nodes.tracers.steppers.codes(#1,"otfstepcharcommand")}} -\unexpanded\def\showotfstepmessages#1% +\def\showotfstepmessages#1% {\ctxlua{nodes.tracers.steppers.messages(#1,"otfstepmessagecommand",true)}} -\unexpanded\def\showotfstepfeatures +\def\showotfstepfeatures {\ctxlua{nodes.tracers.steppers.features()}} -\unexpanded\def\showotfsteps +\def\showotfsteps {\begingroup \veryraggedright \forgetparindent @@ -186,24 +186,14 @@ \newbox\otfcompositionbox -% this should go in spac-ali: - -\installcorenamespace{otfcompositiondir} - -\letvalue{\??otfcompositiondir -1}\righttoleft -\letvalue{\??otfcompositiondir r2l}\righttoleft -\letvalue{\??otfcompositiondir l2r}\lefttoright -\letvalue{\??otfcompositiondir +1}\lefttoright -\letvalue{\??otfcompositiondir 1}\lefttoright - -\unexpanded\def\showotfcomposition#1#2#3% {font*features at size}, rl=-1, text +\def\showotfcomposition#1#2#3% {font*features at size}, rl=-1, text {\begingroup \veryraggedright \forgetparindent \forgeteverypar \setupcolors[\c!state=\v!start]% can be option \startotfsample - \global\setbox\otfcompositionbox\hbox{\definedfont[#1]\relax\getvalue{\??otfcompositiondir#2}\relax#3}% + \global\setbox\otfcompositionbox\hbox{\definedfont[#1]\ifnum#2<0 \textdir TRT\else\ifnum#2>0 \textdir TLT\fi\fi\relax#3}% \stopotfsample \endgroup} |