diff options
author | Karl Berry <karl@freefriends.org> | 2017-05-10 17:56:24 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-05-10 17:56:24 +0000 |
commit | 347d616d3cb26d19d9c79f8b0439712cf5f9012b (patch) | |
tree | 7e7766f16f342eb6a8fb4824d3c9e8376a65f2f1 /Master/texmf-dist/tex/context/modules/mkiv | |
parent | b74dd6fa976d54286d0465def3cbd3a725770307 (diff) |
context (May 9 10:39)
git-svn-id: svn://tug.org/texlive/trunk@44279 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/modules/mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.lua | 21 | ||||
-rw-r--r-- | Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.mkiv | 51 |
2 files changed, 60 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.lua b/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.lua index d4e3244a94a..2b2aa1dfc35 100644 --- a/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.lua +++ b/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.lua @@ -23,6 +23,7 @@ function moduledata.fonts.variable.showvariations(specification) specification = interfaces.checkedspecification(specification) local fontfile = specification.font + local maximum = tonumber(specification.max) or 0xFFFF local fontname = format("testfont-%s",i) local fontsize = tex.dimen.bodyfontsize if not fontfile then @@ -51,6 +52,10 @@ function moduledata.fonts.variable.showvariations(specification) -- return -- end +if not fontdata.shared.rawdata.metadata.fullname then + fontdata.shared.rawdata.metadata.fullname = fontdata.shared.rawdata.metadata.fontname +end + context.starttitle { title = fontdata.shared.rawdata.metadata.fullname } local parameters = fontdata.parameters @@ -224,16 +229,30 @@ function moduledata.fonts.variable.showvariations(specification) end context.stopsubject() + local sample = specification.sample + for i=1,#collected do local instance = collected[i] context.startsubject { title = instance } context.start() context.definedfont { "name:" .. instance .. "*default" } - context.input("zapf.tex") + if sample and sample ~= "" then + context(sample) + else + context.input("zapf.tex") + end context.par() context.stop() context.stopsubject() + + if i > maximum then + context.startsubject { title = "And so on" } + context("no more than %i instances are shown",maximum) + context.par() + context.stopsubject() + break + end end -- local function showregions(tag) diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.mkiv index 7779eb701b0..6b84c2ebb33 100644 --- a/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.mkiv +++ b/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.mkiv @@ -36,7 +36,29 @@ \starttext + \startbuffer[zycon] + \char008986\relax\quad + \char009728\relax\quad + \char010031\relax\quad + \char010143\relax\quad + \char011044\relax\quad + \char127773\relax\quad + \char127989\relax\quad + \char128008\relax\quad + \char128021\relax\quad + \char128034\relax\quad + \char128161\relax\quad + \char128274\relax\quad + \char128347\relax\quad + \char128400\relax\quad + \char128692\relax\quad + \char129417\relax\quad + \char129422\relax\quad + \char983040\relax\par + \stopbuffer + % \showfontkerns +% \showglyphs \showfontvariations [font=file:adobevfprototype.otf] @@ -44,23 +66,30 @@ \showfontvariations [font=file:avenirnextvariable.ttf] -% \showfontvariations -% [font=file:kairossansvariable.ttf] + \showfontvariations + [font=file:DecoVar-VF.ttf] + + \showfontvariations + [font=file:VotoSerifGX.ttf, + max=15] -% \showfontvariations -% [font=file:sourcecode-regular.otf] + \showfontvariations + [font=file:Selawik-Variable.ttf] -% \showfontvariations -% [font=file:AmstelvarAlpha-VF.ttf] + \showfontvariations + [font=file:LibreFranklinGX-Romans.ttf] \showfontvariations - [font=file:DecoVar-VF.ttf] + [font=file:Zycon.ttf, + sample={\getbuffer[zycon]}] - % This is Adam's version of noto .. has lots of instances so it takes a while - % the first time. Looks like I do somethign wrong (bad a's and widths). + % \showfontvariations + % [font=file:kairossansvariable.ttf] -% \showfontvariations -% [font=file:VotoSerifGX.ttf] + % \showfontvariations + % [font=file:sourcecode-regular.otf] + % \showfontvariations + % [font=file:AmstelvarAlpha-VF.ttf] \stoptext |