diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-03-20 18:51:53 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-03-20 18:51:53 +0100 |
commit | 8e0089484acf80066e7393b1245d59dda211be09 (patch) | |
tree | a444a174ea8de55816cb4a9c3def00fb4521e7d8 /tex/context/base/mkiv/font-def.lua | |
parent | 8f5c555274eb48fcaaa3d7f340ee77710846fb7e (diff) | |
download | context-8e0089484acf80066e7393b1245d59dda211be09.tar.gz |
2017-03-20 17:38:00
Diffstat (limited to 'tex/context/base/mkiv/font-def.lua')
-rw-r--r-- | tex/context/base/mkiv/font-def.lua | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/font-def.lua b/tex/context/base/mkiv/font-def.lua index 88d614566..6765be9d3 100644 --- a/tex/context/base/mkiv/font-def.lua +++ b/tex/context/base/mkiv/font-def.lua @@ -184,11 +184,30 @@ end function resolvers.name(specification) local resolve = fonts.names.resolve if resolve then - local resolved, sub, subindex = resolve(specification.name,specification.sub,specification) -- we pass specification for overloaded versions + local resolved, sub, subindex, instance = resolve(specification.name,specification.sub,specification) -- we pass specification for overloaded versions if resolved then specification.resolved = resolved specification.sub = sub specification.subindex = subindex + -- new, needed for experiments + if instance then + specification.instance = instance + local features = specification.features + if not features then + features = { } + specification.features = features + end + local normal = features.normal + if not normal then + normal = { } + features.normal = normal + end + normal.instance = instance +if not callbacks.supported.glyph_stream_provider then + normal.variableshapes = true -- for the moment +end + end + -- local suffix = lower(suffixonly(resolved)) if fonts.formats[suffix] then specification.forced = suffix @@ -296,6 +315,7 @@ end function definers.loadfont(specification) local hash = constructors.hashinstance(specification) + -- todo: also hash by instance / factors local tfmdata = loadedfonts[hash] -- hashes by size ! if not tfmdata then local forced = specification.forced or "" |