diff options
author | Karl Berry <karl@freefriends.org> | 2017-05-07 21:21:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-05-07 21:21:52 +0000 |
commit | 9d415badea95d5684da2dcd2ebbaffed8406f3c6 (patch) | |
tree | 2ce55e5f3ebee37d96ee63cb97b1c5f358aca7e5 /Master/texmf-dist/tex/context/modules | |
parent | 330c975d98e85794aea5a07151b3456c86d37f76 (diff) |
context (May 7 00:36)
git-svn-id: svn://tug.org/texlive/trunk@44236 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/modules')
-rw-r--r-- | Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.lua | 54 | ||||
-rw-r--r-- | Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.mkiv | 19 |
2 files changed, 52 insertions, 21 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 d166e320c94..d4e3244a94a 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 @@ -15,7 +15,7 @@ local lower = string.lower local rep = string.rep local context = context -local NC, NR, HL = context.NC, context.NR, context.HL +local NC, NR, HL, ML = context.NC, context.NR, context.HL, context.ML local bold, monobold, mono, formattedmono = context.bold, context.monobold, context.mono, context.formatted.mono function moduledata.fonts.variable.showvariations(specification) @@ -36,6 +36,7 @@ function moduledata.fonts.variable.showvariations(specification) if not fontdata then context.type("no font with name %a found",fontname) + return end local resources = fontdata.resources @@ -119,21 +120,24 @@ function moduledata.fonts.variable.showvariations(specification) local tag = axis.tag local name = axis.name local variants = axis.variants - local haslimits = variants[1].maximum - local haslink = variants[1].link - for i=1,#variants do - local variant = variants[i] - NC() monobold(tag) - NC() context(name) - NC() context(variant.name) - NC() formattedmono("0x%04x",variant.flags) - NC() context(variant.value) - NC() context(variant.minimum or "-") - NC() context(variant.maximum or "-") - NC() context(variant.link or "-") - NC() NR() - tag = nil - name = nil + local first = variants and variants[1] + if first then + local haslimits = first.maximum + local haslink = first.link + for i=1,#variants do + local variant = variants[i] + NC() monobold(tag) + NC() context(name) + NC() context(variant.name) + NC() formattedmono("0x%04x",variant.flags) + NC() context(variant.value) + NC() context(variant.minimum or "-") + NC() context(variant.maximum or "-") + NC() context(variant.link or "-") + NC() NR() + tag = nil + name = nil + end end end context.stoptabulate() @@ -175,7 +179,16 @@ function moduledata.fonts.variable.showvariations(specification) local collected = { } context.startsubject { title = "instances" } - if instances and #list > 0 then + if not instances or #instances == 0 or not list or #list == 0 then + context("no instances defined, incomplete \\type{fvar}/\\type{stat} table") + else + if #axis > 8 then + context.start() + context.switchtobodyfont { "small" } + if #axis > 12 then + context.switchtobodyfont { "small" } + end + end context.starttabulate { "||" .. rep("c|",#list) .. "|" } NC() for i=1,#list do @@ -185,7 +198,7 @@ function moduledata.fonts.variable.showvariations(specification) local fullname = lower(stripstring(fontdata.shared.rawdata.metadata.fullname)) formattedmono("%s*",fullname) NC() NR() - HL() + ML() for k=1,#instances do local i = instances[k] NC() monobold(i.subfamily) @@ -205,8 +218,9 @@ function moduledata.fonts.variable.showvariations(specification) NC() NR() end context.stoptabulate() - else - context("no instances defined, incomplete \\type{fvar} table") + if #axis > 8 then + context.stop() + end end context.stopsubject() 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 176432630df..7779eb701b0 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 @@ -32,8 +32,12 @@ \usemodule[art-01] +\setuphead[section][before={\testpage[5]\blank[2*big]}] + \starttext +% \showfontkerns + \showfontvariations [font=file:adobevfprototype.otf] @@ -43,7 +47,20 @@ % \showfontvariations % [font=file:kairossansvariable.ttf] +% \showfontvariations +% [font=file:sourcecode-regular.otf] + +% \showfontvariations +% [font=file:AmstelvarAlpha-VF.ttf] + \showfontvariations - [font=file:sourcecode-regular.otf] + [font=file:DecoVar-VF.ttf] + + % 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:VotoSerifGX.ttf] + \stoptext |