diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkxl/font-ctx.lmt')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkxl/font-ctx.lmt | 75 |
1 files changed, 39 insertions, 36 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkxl/font-ctx.lmt b/Master/texmf-dist/tex/context/base/mkxl/font-ctx.lmt index 23c676e4ee5..113cade52d4 100644 --- a/Master/texmf-dist/tex/context/base/mkxl/font-ctx.lmt +++ b/Master/texmf-dist/tex/context/base/mkxl/font-ctx.lmt @@ -529,19 +529,13 @@ do end ---[[ldx-- -<p>So far we haven't really dealt with features (or whatever we want -to pass along with the font definition. We distinguish the following -situations:</p> -situations:</p> - -<code> -name:xetex like specs -name@virtual font spec -name*context specification -</code> ---ldx]]-- - +-- So far we haven't really dealt with features (or whatever we want to pass along +-- with the font definition. We distinguish the following situations: +-- +-- name:xetex like specs +-- name@virtual font spec +-- name*context specification +-- -- Currently fonts are scaled while constructing the font, so we have to do scaling -- of commands in the vf at that point using e.g. "local scale = g.parameters.factor -- or 1" after all, we need to work with copies anyway and scaling needs to be done @@ -1383,25 +1377,35 @@ do -- else too many locals local characters = tfmdata.characters local parameters = tfmdata.parameters local properties = tfmdata.properties - -- we use char0 as signal; cf the spec pdf can handle this (no char in slot) - characters[0] = nil - tfmdata.original = specification.specification - local id = definefont(tfmdata,properties.id) - csnames[id] = specification.cs - properties.id = id -- already set - definers.register(tfmdata,id) -- to be sure, normally already done - texdefinefont(global,cs,id) - -- texdefinefont(cs,id,global and "global") - constructors.finalize(tfmdata) - if trace_defining then - report_defining("defining %a, id %a, target %a, features %a / %a, fallbacks %a / %a, step %a", - name,id,nice_cs(cs),classfeatures,fontfeatures,classfallbacks,fontfallbacks,"-") + if characters then + -- we use char0 as signal; cf the spec pdf can handle this (no char in slot) + characters[0] = nil + tfmdata.original = specification.specification + local id = definefont(tfmdata,properties.id) + csnames[id] = specification.cs + properties.id = id -- already set + definers.register(tfmdata,id) -- to be sure, normally already done + texdefinefont(global,cs,id) + -- texdefinefont(cs,id,global and "global") + constructors.finalize(tfmdata) + if trace_defining then + report_defining("defining %a, id %a, target %a, features %a / %a, fallbacks %a / %a, step %a", + name,id,nice_cs(cs),classfeatures,fontfeatures,classfallbacks,fontfallbacks,"-") + end + -- resolved (when designsize is used): + local size = round(tfmdata.parameters.size or 655360) + setmacro("somefontsize",size.."sp") + texsetcount(c_scaledfontsize,size) + lastfontid = id + else + -- case 1: same as ** + local nice = nice_cs(cs) + if not reported[name][nice] then + report_defining("unable to define %a as %a",name,nice) + end + lastfontid = -1 + texsetcount(c_scaledfontsize,0) end - -- resolved (when designsize is used): - local size = round(tfmdata.parameters.size or 655360) - setmacro("somefontsize",size.."sp") - texsetcount(c_scaledfontsize,size) - lastfontid = id elseif tfmtype == "number" then if trace_defining then report_defining("reusing %s, id %a, target %a, features %a / %a, fallbacks %a / %a, goodies %a / %a, designsize %a / %a", @@ -1417,6 +1421,7 @@ do -- else too many locals texsetcount(c_scaledfontsize,size) lastfontid = tfmdata else + -- case 2: same as ** local nice = nice_cs(cs) if not reported[name][nice] then report_defining("unable to define %a as %a",name,nice) @@ -1592,7 +1597,7 @@ do -- else too many locals return (define { name = name, size = size } or 0) end - callbacks.register('define_font', read, "definition of fonts (tfmdata preparation)") + callbacks.register("define_font",read,"define and/or load a font") -- here @@ -2258,10 +2263,8 @@ dimenfactors.em = nil dimenfactors["%"] = nil dimenfactors.pct = nil ---[[ldx-- -<p>Before a font is passed to <l n='tex'/> we scale it. Here we also need -to scale virtual characters.</p> ---ldx]]-- +-- Before a font is passed to TeX we scale it. Here we also need to scale virtual +-- characters. do |