diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-02-21 19:26:29 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2018-02-21 19:26:29 +0100 |
commit | 8e51addbcecd962280c24a77de9ec1f6724e7a65 (patch) | |
tree | 6a0f3b7ba546826e0864909da326df101068c5b8 /tex/context/modules/mkiv | |
parent | 9bb459e9fedcad94579973ccd07ad9e78d0734c8 (diff) | |
download | context-8e51addbcecd962280c24a77de9ec1f6724e7a65.tar.gz |
2018-02-21 18:27:00
Diffstat (limited to 'tex/context/modules/mkiv')
-rw-r--r-- | tex/context/modules/mkiv/s-def-01.mkiv | 10 | ||||
-rw-r--r-- | tex/context/modules/mkiv/s-fnt-10.mkiv | 169 | ||||
-rw-r--r-- | tex/context/modules/mkiv/s-fnt-21.mkiv | 64 | ||||
-rw-r--r-- | tex/context/modules/mkiv/s-fonts-cjk.mkiv (renamed from tex/context/modules/mkiv/s-fnt-24.mkiv) | 10 | ||||
-rw-r--r-- | tex/context/modules/mkiv/s-fonts-complete.mkiv | 160 | ||||
-rw-r--r-- | tex/context/modules/mkiv/s-fonts-engines.mkiv | 196 | ||||
-rw-r--r-- | tex/context/modules/mkiv/s-fonts-steps.mkiv (renamed from tex/context/modules/mkiv/s-fnt-20.mkiv) | 23 | ||||
-rw-r--r-- | tex/context/modules/mkiv/s-reg-01.mkiv | 60 | ||||
-rw-r--r-- | tex/context/modules/mkiv/s-regimes-list.mkiv | 74 |
9 files changed, 458 insertions, 308 deletions
diff --git a/tex/context/modules/mkiv/s-def-01.mkiv b/tex/context/modules/mkiv/s-def-01.mkiv deleted file mode 100644 index 49e585bd0..000000000 --- a/tex/context/modules/mkiv/s-def-01.mkiv +++ /dev/null @@ -1,10 +0,0 @@ -% yes or no - -\unprotect - -\startsetups defaults:frontpart:pagenumbers:roman - \defineconversionset[\c!frontpart:\c!pagenumber][][romannumerals] - \setupuserpagenumber[\c!way=\v!by\v!block] -\stopsetups - -\protect diff --git a/tex/context/modules/mkiv/s-fnt-10.mkiv b/tex/context/modules/mkiv/s-fnt-10.mkiv deleted file mode 100644 index 731c4be39..000000000 --- a/tex/context/modules/mkiv/s-fnt-10.mkiv +++ /dev/null @@ -1,169 +0,0 @@ -%D \module -%D [ file=s-fnt-01, -%D version=2006.10.10, % guess -%D title=\CONTEXT\ Style File, -%D subtitle=Listing Glyphs in Large Fonts, -%D author=Hans Hagen, -%D date=\currentdate, -%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] -%C -%C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. - -% sort of obsolete - -\startluacode -local fontdata = fonts.hashes.identifiers - --- function fonts.tracers.show_all() --- local tfmdata = fontdata[font.current()] --- if tfmdata and tfmdata.shared then --- local NC, NR, char = context.NC, context.NR, context.char --- context.starttabulate { "|l|r|c|" } --- for unicode, description in fonts.iterators.characters(tfmdata) do --- NC() context(description.name) NC() context(unicode) NC() char(unicode) NC() NR() --- end --- context.stoptabulate() --- end --- end - -local context = context -local escaped = context.escaped - -function fonts.tracers.show_all() - local tfmdata = fontdata[font.current()] - if tfmdata then - local NC, NR, HL, char, bold, tttf = context.NC, context.NR, context.HL, context.char, context.bold, context.tttf - local descriptions = tfmdata.descriptions or { } - local data = characters.data - -- context.setuptabulate { header = "repeat" } - context.starttabulatehead() - NC() bold("unicode") - NC() bold("visual") - NC() bold("index") - NC() bold("glyph") - NC() bold("adobe") - NC() bold("context") - NC() NR() - context.stoptabulatehead() - context.starttabulate { "|l|c|l|p|p|p|" } - for unicode, chr in fonts.iterators.characters(tfmdata) do - local des, dat = descriptions[unicode], data[unicode] - local index = chr.index or 0 - local cname = (dat and dat.contextname) or "" - local aname = (dat and dat.adobename) or "" - local gname = (des and des.name) or "" - local mname = dat and dat.mathname - if type(mname) ~= "string" then - mname = "" - end - local mspec = dat and dat.mathspec - if mspec then - for m=1,#mspec do - local n = mspec[m].name - if n then - if mname == "" then - mname = n - else - mname = mname .. " " .. n - end - end - end - end - if mname ~= "" then - mname = "m: " .. mname - if cname ~= "" then - cname = cname .. " " .. mname - else - cname = mname - end - end - NC() tttf() context("U+%05X",unicode) - NC() char(unicode) - NC() tttf() context("%05X",index) - NC() if gname ~= "" then tttf() escaped(gname) end - NC() if aname ~= "" then tttf() context(aname) end - NC() if cname ~= "" then tttf() context(cname) end - NC() NR() - end - context.stoptabulate() - else - context("problems") - end -end - -function fonts.tracers.show_glyphs() - local tfmdata = fontdata[font.current()] - if tfmdata then - for unicode, chr in fonts.iterators.characters(tfmdata) do - context.showglyph(unicode) - end - end -end -\stopluacode - -\unexpanded\def\ShowCompleteFont#1#2#3% - {\bgroup - \page - \font\TestFont=#1 at #2 - \setuplayout[style=\TestFont] - \setupheadertexts[] - \setupfootertexts[#1 -- \pagenumber] - \setupfootertexts[pagenumber] - \setuplayout[width=middle,height=middle,topspace=1cm,backspace=1cm] - \TestFont - \nonknuthmode - \startcolumns[n=#3] - \TestFont - \ctxlua { fonts.tracers.show_all() } - \stopcolumns - \page - \egroup} - -\unexpanded\def\ShowAllGlyphs#1#2#3% - {\bgroup - \page - \def\showglyph##1{\dontleavehmode\strut\char##1\relax\par} - \font\TestFontA=#1 at 12pt - \font\TestFontB=#1 at #2 - \setuplayout[style=\TestFontA] - \setupheadertexts[] - \setupfootertexts[#1\space\endash\space\pagenumber] - \setuplayout[width=middle,height=middle,topspace=1cm,backspace=1cm,header=1cm,footer=2cm] - \TestFontB \setupinterlinespace[line=1.2\dimexpr#2\relax] \raggedcenter - \nonknuthmode - \startcolumns[n=#3] - \TestFontB - \ctxlua { fonts.tracers.show_glyphs() } - \stopcolumns - \page - \egroup} - -\continueifinputfile{s-fnt-10.mkiv} - -\starttext - -% \ShowCompleteFont{name:dejavusansmono}{10pt}{1} -% \ShowCompleteFont{name:dejavuserif}{10pt}{2} -% \ShowCompleteFont{name:officinasansbookitcregular}{10pt}{2} -% \ShowCompleteFont{name:officinaserifbookitcregular}{10pt}{2} -% \ShowCompleteFont{name:serpentineserifeflight}{10pt}{2} -\ShowCompleteFont{name:lmroman10-regular}{10pt}{1} -% \ShowCompleteFont{name:lmtypewriter10-regular}{10pt}{2} -% \ShowCompleteFont{lt55485}{10pt}{2} -% \ShowCompleteFont{lmr10}{10pt}{2} -% \ShowCompleteFont{lbr}{10pt}{2} -% \ShowCompleteFont{name:Cambria}{10pt}{2} -% \ShowCompleteFont{name:CambriaMath}{10pt}{2} -% \ShowCompleteFont{name:texgyrepagella-regular}{10pt}{2} -% \ShowCompleteFont{name:texgyrechorus-mediumitalic}{10pt}{2} -% \ShowAllGlyphs {name:texgyrepagella-regular} {48pt}{2} -% \ShowAllGlyphs {name:texgyrechorus-mediumitalic}{48pt}{2} -% \ShowCompleteFont{name:euler10-regular}{10pt}{2} - -% \ShowCompleteFont{name:palatinosansinformalcombold}{20pt}{2} -% \ShowCompleteFont{name:palatinonovaregular}{11pt}{2} -% \ShowCompleteFont{pirat.ttf}{12pt}{1} - -\stoptext diff --git a/tex/context/modules/mkiv/s-fnt-21.mkiv b/tex/context/modules/mkiv/s-fnt-21.mkiv deleted file mode 100644 index 10d5a4623..000000000 --- a/tex/context/modules/mkiv/s-fnt-21.mkiv +++ /dev/null @@ -1,64 +0,0 @@ -%D \module -%D [ file=s-fnt-20, -%D version=2009.01.10, -%D title=\CONTEXT\ Style File, -%D subtitle=Tracing Feature Application (2), -%D author=Hans Hagen, -%D date=\currentdate, -%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] -%C -%C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. - -%D This module is related to: - -\usemodule[fnt-20] - -\setvariables - [otftracker] - [set=\setups{araball}] - -\startsetups araball - \begingroup - \setupcolors[state=start]% - \enabletrackers[otf.analyzing]% beware, kind of global - \ruledhbox \bgroup - \definedfont[\getvariable{otftracker}{font}*\getvariable{otftracker}{features} at \getvariable{otftracker}{size}]% - \ifnum\getvariable{otftracker}{direction}<0 \textdir TRT\else\ifnum\getvariable{otftracker}{direction}>0 \textdir TLT\fi\fi\relax - \getvariable{otftracker}{sample}% - \egroup - \disabletrackers[otf.analyzing]% - \endgroup -\stopsetups - -\unexpanded\def\ShowOtfTrackerSample#1% - {\doiffile{#1} - {\blank - \startlinecorrection - \vbox \bgroup - \forgetall - \setbox\scratchbox\hbox{\component #1 \relax} - \hbox{\copy\scratchbox\quad\lower\dp\scratchbox\hbox{\ruledhbox{\externalfigure[#1-volt.pdf][height=\htdp\scratchbox]}}} - \hbox{\strut\tttf#1}% - \egroup - \stoplinecorrection - \blank}} - -\endinput - -% \usemodule[fnt-21] -% -% \starttext -% -% \setvariables -% [otftracker] -% [direction=-1, -% sample=لا, -% title=Test, -% font=file:arabtype, -% % font=file:husayni, -% % font=file:scheherazaderegot, -% features=arabic] -% -% \stoptext diff --git a/tex/context/modules/mkiv/s-fnt-24.mkiv b/tex/context/modules/mkiv/s-fonts-cjk.mkiv index 2e6b9a591..fae041316 100644 --- a/tex/context/modules/mkiv/s-fnt-24.mkiv +++ b/tex/context/modules/mkiv/s-fonts-cjk.mkiv @@ -1,5 +1,5 @@ %D \module -%D [ file=s-fnt-24, +%D [ file=s-fonts-cjk, % was: s-fnt-24 %D version=2009.02.06, %D title=\CONTEXT\ Style File, %D subtitle=CJK Glyph Combination Testing, @@ -11,9 +11,11 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +\startmodule[fonts-cjk] + \unprotect -\def\ShowChineseCombiChar#1#2#3#4% +\unexpanded\def\ShowChineseCombiChar#1#2#3#4% {\blank[small] \dontleavehmode \hbox\bgroup @@ -71,7 +73,7 @@ end \unexpanded\def\ShowCombinationsChinese {\dodoubleempty\doShowCombinationsChinese} -\def\doShowCombinationsChinese[#1][#2]% +\unexpanded\def\doShowCombinationsChinese[#1][#2]% {\startpacked \setscript[hanzi] \setupcolors[\c!state=\v!start] @@ -80,4 +82,6 @@ end \disabletrackers[cjk.analyzing] \stoppacked} +\stopmodule + \protect \endinput diff --git a/tex/context/modules/mkiv/s-fonts-complete.mkiv b/tex/context/modules/mkiv/s-fonts-complete.mkiv new file mode 100644 index 000000000..afdd79b4c --- /dev/null +++ b/tex/context/modules/mkiv/s-fonts-complete.mkiv @@ -0,0 +1,160 @@ +%D \module +%D [ file=s-fnt-01, +%D version=2006.10.10, % guess +%D title=\CONTEXT\ Style File, +%D subtitle=Listing Glyphs in Large Fonts, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D This module is sort of obsolete as other moduels give nicer overviews. + +\startluacode + moduledata.fonts = moduledata.fonts or { } + moduledata.fonts.complete = moduledata.fonts.complete or { } + + local fontdata = fonts.hashes.identifiers + + local context = context + local escaped = context.escaped + + function moduledata.fonts.complete.all() + local tfmdata = fontdata[true] + if tfmdata then + local NC, NR, HL, char, bold, tttf = context.NC, context.NR, context.HL, context.char, context.bold, context.tttf + local descriptions = tfmdata.descriptions or { } + local data = characters.data + -- context.setuptabulate { header = "repeat" } + context.starttabulatehead() + NC() bold("unicode") + NC() bold("visual") + NC() bold("index") + NC() bold("glyph") + NC() bold("adobe") + NC() bold("context") + NC() NR() + context.stoptabulatehead() + context.starttabulate { "|l|c|l|p|p|p|" } + for unicode, chr in fonts.iterators.characters(tfmdata) do + local des, dat = descriptions[unicode], data[unicode] + local index = chr.index or 0 + local cname = (dat and dat.contextname) or "" + local aname = (dat and dat.adobename) or "" + local gname = (des and des.name) or "" + local mname = dat and dat.mathname + if type(mname) ~= "string" then + mname = "" + end + local mspec = dat and dat.mathspec + if mspec then + for m=1,#mspec do + local n = mspec[m].name + if n then + if mname == "" then + mname = n + else + mname = mname .. " " .. n + end + end + end + end + if mname ~= "" then + mname = "m: " .. mname + if cname ~= "" then + cname = cname .. " " .. mname + else + cname = mname + end + end + NC() tttf() context("U+%05X",unicode) + NC() char(unicode) + NC() tttf() context("%05X",index) + NC() if gname ~= "" then tttf() escaped(gname) end + NC() if aname ~= "" then tttf() context(aname) end + NC() if cname ~= "" then tttf() context(cname) end + NC() NR() + end + context.stoptabulate() + else + context("problems") + end + end + + function moduledata.fonts.complete.glyphs() + local tfmdata = fontdata[true] + if tfmdata then + for unicode, chr in fonts.iterators.characters(tfmdata) do + context.showglyph(unicode) + end + end + end +\stopluacode + +\unexpanded\def\ShowCompleteFont#1#2#3% + {\begingroup + \page + \font\TestFont=#1 at #2 + \setuplayout[style=\TestFont] + \setupheadertexts[] + \setupfootertexts[#1 -- \pagenumber] + \setupfootertexts[pagenumber] + \setuplayout[width=middle,height=middle,topspace=1cm,backspace=1cm] + \TestFont + \nonknuthmode + \startcolumns[n=#3] + \TestFont + \ctxlua { moduledata.fonts.complete.all() } + \stopcolumns + \page + \endgroup} + +\unexpanded\def\ShowAllGlyphs#1#2#3% + {\begingroup + \page + \def\showglyph##1{\dontleavehmode\strut\char##1\relax\par} + \font\TestFontA=#1 at 12pt + \font\TestFontB=#1 at #2 + \setuplayout[style=\TestFontA] + \setupheadertexts[] + \setupfootertexts[#1\space\endash\space\pagenumber] + \setuplayout[width=middle,height=middle,topspace=1cm,backspace=1cm,header=1cm,footer=2cm] + \TestFontB \setupinterlinespace[line=1.2\dimexpr#2\relax] \raggedcenter + \nonknuthmode + \startcolumns[n=#3] + \TestFontB + \ctxlua { moduledata.fonts.complete.glyphs() } + \stopcolumns + \page + \endgroup} + +\continueifinputfile{s-fonts-complete.mkiv} + +\starttext + +% \ShowCompleteFont{name:dejavusansmono}{10pt}{1} +% \ShowCompleteFont{name:dejavuserif}{10pt}{2} +% \ShowCompleteFont{name:officinasansbookitcregular}{10pt}{2} +% \ShowCompleteFont{name:officinaserifbookitcregular}{10pt}{2} +% \ShowCompleteFont{name:serpentineserifeflight}{10pt}{2} +\ShowCompleteFont{name:lmroman10-regular}{10pt}{1} +% \ShowCompleteFont{name:lmtypewriter10-regular}{10pt}{2} +% \ShowCompleteFont{lt55485}{10pt}{2} +% \ShowCompleteFont{lmr10}{10pt}{2} +% \ShowCompleteFont{lbr}{10pt}{2} +% \ShowCompleteFont{name:Cambria}{10pt}{2} +% \ShowCompleteFont{name:CambriaMath}{10pt}{2} +% \ShowCompleteFont{name:texgyrepagella-regular}{10pt}{2} +% \ShowCompleteFont{name:texgyrechorus-mediumitalic}{10pt}{2} +% \ShowAllGlyphs {name:texgyrepagella-regular} {48pt}{2} +% \ShowAllGlyphs {name:texgyrechorus-mediumitalic}{48pt}{2} +% \ShowCompleteFont{name:euler10-regular}{10pt}{2} + +% \ShowCompleteFont{name:palatinosansinformalcombold}{20pt}{2} +% \ShowCompleteFont{name:palatinonovaregular}{11pt}{2} +% \ShowCompleteFont{pirat.ttf}{12pt}{1} + +\stoptext diff --git a/tex/context/modules/mkiv/s-fonts-engines.mkiv b/tex/context/modules/mkiv/s-fonts-engines.mkiv new file mode 100644 index 000000000..1b1f664b8 --- /dev/null +++ b/tex/context/modules/mkiv/s-fonts-engines.mkiv @@ -0,0 +1,196 @@ +%D \module +%D [ file=s-fonts-engines, % was: s-fnt-22 +%D version=2017.06.21, +%D title=\CONTEXT\ Style File, +%D subtitle=Compare engines and such, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D This module is just for me when I wanted to check some husayni (by Idris) +%D regression. Interesting is that fina should be disabled for hb (otherwise +%D garbage) and that some substitutions are ignored in hb (1.1.3), so we can +%D only compare some examples. Don't expect this style to be stable as I +%D might change default features. + +\startmodule[fonts-engines] + +\usemodule[fonts-steps] +\usemodule[fonts-plugins] + +\enabletrackers[fonts.reorderlookups] + +\startsetups otftracker-extra-context + \definedfont[\getvariable{otftracker}{font}*\getvariable{otftracker}{features} at \getvariable{otftracker}{size}]\relax + \setotfcompositiondirection{\getvariable{otftracker}{direction}}\relax + \getvariable{otftracker}{sample}\relax +\stopsetups + +\startsetups otftracker-extra-context-reordered + \definedfont[\getvariable{otftracker}{font}*otftracker-context-reordered at \getvariable{otftracker}{size}]\relax + \setotfcompositiondirection{\getvariable{otftracker}{direction}}\relax + \getvariable{otftracker}{sample}\relax +\stopsetups + +\startsetups otftracker-extra-harfbuzz + \definedfont[\getvariable{otftracker}{font}*otftracker-harfbuzz-native at \getvariable{otftracker}{size}]\relax + \setotfcompositiondirection{\getvariable{otftracker}{direction}}\relax + \getvariable{otftracker}{sample}\relax +\stopsetups + +\startsetups otftracker-extra-uniscribe + \definedfont[\getvariable{otftracker}{font}*otftracker-harfbuzz-uniscribe at \getvariable{otftracker}{size}]\relax + \setotfcompositiondirection{\getvariable{otftracker}{direction}}\relax + \getvariable{otftracker}{sample}\relax +\stopsetups + +\definecolor[otftracker-overlay-1][a=1,t=.5,b=1] +\definecolor[otftracker-overlay-2][a=1,t=.5,g=1] +\definecolor[otftracker-overlay-3][a=1,t=.5,r=1] + +% This is a sort of a check against xetex but with limited font trickery because we bypass +% the normal font handling. It's no big deal for a test. The biggest problem is that we +% run into default features and we don't know what is turned on by default. We also need +% to disable tagging so that hb itself can do some (init/medi/fina) magic in setting +% features. + +\startsetups otftracker-extra + \start + \blank + \definefontfeature + [otftracker-context-reordered] + [\getvariable{otftracker}{features}] + [reorderlookups=arab] + \definefontfeature + [otftracker-harfbuzz-uniscribe] + [\getvariable{otftracker}{features}] + [mode=plug, + features=harfbuzz, + shaper=uniscribe, + % stch=nothing, + % ccmp=nothing, + % locl=nothing, + % rlig=nothing, + % calt=nothing, + % mset=nothing, + fina=nothing, % looks like the libs does something special + init=nothing, % looks like the libs does something special + medi=nothing, % looks like the libs does something special + isol=nothing, % looks like the libs does something special + % method=binary, + script=arabic] + \definefontfeature + [otftracker-harfbuzz-native] + [\getvariable{otftracker}{features}] + [mode=plug, + features=harfbuzz, + shaper=native, + % stch=nothing, + % ccmp=nothing, + % locl=nothing, + % rlig=nothing, + % calt=nothing, + % mset=nothing, + fina=nothing, % looks like the libs does something special + init=nothing, % looks like the libs does something special + medi=nothing, % looks like the libs does something special + isol=nothing, % looks like the libs does something special + script=arabic] + \doifelsesomething {\getvariable{otftracker}{comment}} { + \def\ExtraComment{ + \TB + \NC + comment + \NC + \vtop { + \hsize\dimexpr\hsize-10em\relax + \veryraggedright + \getvariable{otftracker}{comment} + } + \NC \NR + } + } { + \def\ExtraComment{} + } + \starttabulate[|lTB|l|] + \NC + context + \NC + \showglyphs \showfontkerns + \enabletrackers[otf.sample.silent] + \ruledhbox{\directsetup{otftracker-extra-context}} + \disabletrackers[otf.sample] + \NC \NR \TB \NC + reordered + \NC + \showglyphs \showfontkerns + \enabletrackers[otf.sample.silent] + \ruledhbox{\directsetup{otftracker-extra-context-reordered}} + \disabletrackers[otf.sample] + \NC \NR \TB \NC + harfbuzz + \NC + \showglyphs \showfontkerns + \enabletrackers[fonts.plugins.hb.colors] + \ruledhbox{\directsetup{otftracker-extra-harfbuzz}} + \disabletrackers[fonts.plugins.hb.colors] + \NC \NR \TB \NC + uniscribe + \NC + \showglyphs \showfontkerns + \enabletrackers[fonts.plugins.hb.colors] + \ruledhbox{\directsetup{otftracker-extra-uniscribe}} + \disabletrackers[fonts.plugins.hb.colors] + \NC \NR \TB \NC + context + \NC + \showglyphs \showfontkerns + \ruledhbox{\directsetup{otftracker-extra-context}} + \NC \NR \TB \NC + harfbuzz + \NC + \showglyphs \showfontkerns + \ruledhbox{\directsetup{otftracker-extra-harfbuzz}} + \NC \NR \TB \NC + uniscribe + \NC + \showglyphs \showfontkerns + \ruledhbox{\directsetup{otftracker-extra-uniscribe}} + \NC \NR \TB \NC + context harfbuzz + \NC + \showglyphs \showfontkerns + \hbox to \zeropoint { + \ruledhbox{\color[otftracker-overlay-1]{\directsetup{otftracker-extra-harfbuzz}}} + \hss + } + \ruledhbox{\color[otftracker-overlay-3]{\directsetup{otftracker-extra-context}}} + \NC \NR \TB \NC + uniscribe harfbuzz + \NC + \showglyphs \showfontkerns + \hbox to \zeropoint { + \ruledhbox{\color[otftracker-overlay-1]{\directsetup{otftracker-extra-harfbuzz}}} + \hss + } + \ruledhbox{\color[otftracker-overlay-2]{\directsetup{otftracker-extra-uniscribe}}} + \NC \NR \TB \NC + context uniscribe + \NC + \showglyphs \showfontkerns + \hbox to \zeropoint { + \ruledhbox{\color[otftracker-overlay-1]{\directsetup{otftracker-extra-uniscribe}}} + \hss + } + \ruledhbox{\color[otftracker-overlay-2]{\directsetup{otftracker-extra-context}}} + \NC \NR + \ExtraComment + \stoptabulate + \stop +\stopsetups + +\stopmodule diff --git a/tex/context/modules/mkiv/s-fnt-20.mkiv b/tex/context/modules/mkiv/s-fonts-steps.mkiv index 6fc1edb22..6e11a6a77 100644 --- a/tex/context/modules/mkiv/s-fnt-20.mkiv +++ b/tex/context/modules/mkiv/s-fonts-steps.mkiv @@ -1,5 +1,5 @@ %D \module -%D [ file=s-fnt-20, +%D [ file=s-fonts-steps, % was s-fnt-20 %D version=2009.01.10, %D title=\CONTEXT\ Style File, %D subtitle=Tracing Feature Application (1), @@ -14,6 +14,8 @@ %D This file is used by Idris and me in the process of getting the %D best arabic fonts getting rendered best. As such it might change. +\startmodule[fonts-steps] + % \setvariables % [otftracker] % [title=Reverse Chaining, @@ -146,7 +148,24 @@ \stoptext \stopsetups -\continueifinputfile{s-fnt-20.mkiv} +%D For old times sake we keep this one: + +\unexpanded\def\ShowOtfTrackerSample#1% + {\doiffile{#1} + {\blank + \startlinecorrection + \vbox \bgroup + \forgetall + \setbox\scratchbox\hbox{\component #1 \relax} + \hbox{\copy\scratchbox\quad\lower\dp\scratchbox\hbox{\ruledhbox{\externalfigure[#1-volt.pdf][height=\htdp\scratchbox]}}} + \hbox{\strut\tttf#1}% + \egroup + \stoplinecorrection + \blank}} + +\stopmodule + +\continueifinputfile{s-fonts-steps.mkiv} \usemodule[art-01] diff --git a/tex/context/modules/mkiv/s-reg-01.mkiv b/tex/context/modules/mkiv/s-reg-01.mkiv deleted file mode 100644 index 36434c30c..000000000 --- a/tex/context/modules/mkiv/s-reg-01.mkiv +++ /dev/null @@ -1,60 +0,0 @@ -%D \module -%D [ file=s-reg-01, -%D version=2005.04.25, -%D title=\CONTEXT\ Style File, -%D subtitle=Extra Regime Support, -%D author=Hans Hagen, -%D date=\currentdate, -%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] -%C -%C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. - -%D \macros -%D {showregime} -%D -%D This code is moved from the kernel to here. (We could make it -%D auto-loadable). - -\startluacode ---[[ldx-- -<p>The following code is rather <l n='context'/> specific.</p> ---ldx]]-- - -function regimes.show(regime) - regime = regimes.synonyms[regime] or regime - local r = regimes.data[regime] - if r then - local chardata = characters.data - context.starttabulate { "|rT|T|rT|lT|lT|lT|" } - for k, v in ipairs(r) do - local chr = chardata[v] - if chr then - context.NC() context(k) - context.NC() context.getvalue(chr.contextname]) - context.NC() context("%U+05X",v) - context.NC() context(chr.contextname) - context.NC() context(chr.category) - context.NC() context(chr.description) - context.NC() context.NR() - else - -- can't happen - end - end - context.stoptabulate() - else - context("unknown regime %s",regime) - end -end -\stopluacode - -\unprotect - -\def\showregime - {\dosingleempty\doshowregime} - -\def\doshowregime[#1]% - {\ctxlua{regimes.show("#1")}} - -\protect \endinput diff --git a/tex/context/modules/mkiv/s-regimes-list.mkiv b/tex/context/modules/mkiv/s-regimes-list.mkiv new file mode 100644 index 000000000..0124b3023 --- /dev/null +++ b/tex/context/modules/mkiv/s-regimes-list.mkiv @@ -0,0 +1,74 @@ +%D \module +%D [ file=s-regimes-list, % was: s-reg-01 +%D version=2005.04.25, +%D title=\CONTEXT\ Style File, +%D subtitle=Extra Regime Support, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D \macros +%D {showregime} +%D +%D This code is moved from the kernel to here. + +\startmodule[regimes-list] + +\startluacode + +moduledata.regimes = moduledata.regimes or { } +moduledata.regimes.charts = moduledata.regimes.charts or { } + +local byte = string.byte + +function moduledata.regimes.charts.show(regime) + if regime and regime ~= "" then + local r = regimes.mapping[regime] + if r then + local chardata = characters.data + context.starttabulate { "|rT|rT|rT|cT|lT|lT|pT|" } + for k, v in table.sortedhash(r) do + local chr = chardata[v] + local num = byte(k) + local uni = utf.byte(v) + if chr then + context.NC() context(num) + context.NC() context("0x%02X",num) + context.NC() context("%U",uni) + context.NC() context.char(uni) + context.NC() context(chr.contextname) + context.NC() context(chr.category) + context.NC() context(chr.description) + context.NC() context.NR() + else + -- can't happen + end + end + context.stoptabulate() + else + context("unknown regime %s",regime) + end + else + context("available regimes: %, t",regimes.list()) + end +end + +\stopluacode + +\installmodulecommandluasingle \showregime {moduledata.regimes.charts.show} + +\stopmodule + +\continueifinputfile{s-regimes-list.mkiv} + +\usemodule[art-01] + +\starttext + + \showregime[8859-1] + +\stoptext |