diff options
author | Hans Hagen <pragma@wxs.nl> | 2021-01-21 18:48:54 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2021-01-21 18:48:54 +0100 |
commit | aea52f4b97d1be9ba194cd9a1d0ff1865c413691 (patch) | |
tree | 6b6fe6b48a7b8f161442e391ab03c34f2b4222b4 /tex/context/base/mkiv | |
parent | e7016154c1f84ab4f9420c19d14af6a28f53bac8 (diff) | |
download | context-aea52f4b97d1be9ba194cd9a1d0ff1865c413691.tar.gz |
2021-01-21 18:04:00
Diffstat (limited to 'tex/context/base/mkiv')
-rw-r--r-- | tex/context/base/mkiv/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/font-one.lua | 1 | ||||
-rw-r--r-- | tex/context/base/mkiv/font-otl.lua | 1 | ||||
-rw-r--r-- | tex/context/base/mkiv/font-prv.lua | 33 | ||||
-rw-r--r-- | tex/context/base/mkiv/font-tfm.lua | 1 | ||||
-rw-r--r-- | tex/context/base/mkiv/meta-fnt.lua | 7 | ||||
-rw-r--r-- | tex/context/base/mkiv/status-files.pdf | bin | 26107 -> 26114 bytes | |||
-rw-r--r-- | tex/context/base/mkiv/status-lua.pdf | bin | 254911 -> 255046 bytes | |||
-rw-r--r-- | tex/context/base/mkiv/strc-ref.lua | 7 |
10 files changed, 46 insertions, 8 deletions
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index 6012a3fb2..957f20c84 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -13,7 +13,7 @@ % \normalend % uncomment this to get the real base runtime -\newcontextversion{2021.01.18 18:15} +\newcontextversion{2021.01.21 18:01} %D This file is loaded at runtime, thereby providing an excellent place for hacks, %D patches, extensions and new features. There can be local overloads in cont-loc diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index edb5c2de8..1333eb16f 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -45,7 +45,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2021.01.18 18:15} +\edef\contextversion{2021.01.21 18:01} %D Kind of special: diff --git a/tex/context/base/mkiv/font-one.lua b/tex/context/base/mkiv/font-one.lua index 5ef6e4749..829f52ea0 100644 --- a/tex/context/base/mkiv/font-one.lua +++ b/tex/context/base/mkiv/font-one.lua @@ -727,6 +727,7 @@ local function read_from_afm(specification) local tfmdata = afmtotfm(specification) if tfmdata then tfmdata.properties.name = specification.name + tfmdata.properties.id = specification.id tfmdata = constructors.scale(tfmdata, specification) local allfeatures = tfmdata.shared.features or specification.features.normal constructors.applymanipulators("afm",tfmdata,allfeatures,trace_features,report_afm) diff --git a/tex/context/base/mkiv/font-otl.lua b/tex/context/base/mkiv/font-otl.lua index 19de2bb77..8159db180 100644 --- a/tex/context/base/mkiv/font-otl.lua +++ b/tex/context/base/mkiv/font-otl.lua @@ -608,6 +608,7 @@ local function read_from_otf(specification) -- this late ? .. needs checking tfmdata.properties.name = specification.name tfmdata.properties.sub = specification.sub + tfmdata.properties.id = specification.id -- tfmdata = constructors.scale(tfmdata,specification) local allfeatures = tfmdata.shared.features or specification.features.normal diff --git a/tex/context/base/mkiv/font-prv.lua b/tex/context/base/mkiv/font-prv.lua index c3323ca74..15057e255 100644 --- a/tex/context/base/mkiv/font-prv.lua +++ b/tex/context/base/mkiv/font-prv.lua @@ -80,3 +80,36 @@ end function helpers.newprivateslot(name) return sharedprivates[name] end + +do + + local context = context + local utfchar = utf.char + + interfaces.implement { + name = "privatecharacter", + public = true, + -- protected = true, + arguments = "string", + actions = function(name) + local c = sharedprivates[name] + if c then + context(utfchar(c)) + end + end + } + + interfaces.implement { + name = "privatecharactercode", + public = true, + -- protected = true, + arguments = "string", + actions = function(name) + local c = sharedprivates[name] + if c then + context(c) -- serialized, not a number + end + end + } + +end diff --git a/tex/context/base/mkiv/font-tfm.lua b/tex/context/base/mkiv/font-tfm.lua index 4dbd5fc66..945421a42 100644 --- a/tex/context/base/mkiv/font-tfm.lua +++ b/tex/context/base/mkiv/font-tfm.lua @@ -163,6 +163,7 @@ local function read_from_tfm(specification) shared.features = features shared.resources = resources -- + properties.id = specification.id properties.name = tfmdata.name -- todo: fallback properties.fontname = tfmdata.fontname -- todo: fallback properties.psname = tfmdata.psname -- todo: fallback diff --git a/tex/context/base/mkiv/meta-fnt.lua b/tex/context/base/mkiv/meta-fnt.lua index 92bbe0716..54c66ceb9 100644 --- a/tex/context/base/mkiv/meta-fnt.lua +++ b/tex/context/base/mkiv/meta-fnt.lua @@ -12,6 +12,7 @@ local format = string.format local formatters = string.formatters local chardata = characters.data local fontdata = fonts.hashes.identifiers +local round = math.round local vffonts = fonts.handlers.vf @@ -97,7 +98,7 @@ local function process(mpxformat,name,instances,scalefactor) local fontname = file.removesuffix(file.basename(name)) local modification = attributes.modification local filesize = attributes.size - local hash = file.robustname(formatters["%s %05i %03i"](fontname,scalefactor*1000,instances)) + local hash = file.robustname(formatters["%s %05i %03i"](fontname,round(scalefactor*1000),instances)) local lists = containers.read(mpfonts.cache,hash) if not lists or lists.modification ~= modification or lists.filesize ~= filesize or lists.instances ~= instances or lists.scalefactor ~= scalefactor then statistics.starttiming(flusher) @@ -167,8 +168,8 @@ local function build(g,v) local t = { } for d=1,#data do t = fonts.constructors.scale(data[d],-1000) - -- local id = font.nextid() - -- t.fonts = { { id = id } } + local id = font.nextid() + t.fonts = { { id = id } } fontdata[id] = t if v[5] then vffonts.helpers.composecharacters(t) diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex ef1dbd7f2..d7e78e066 100644 --- a/tex/context/base/mkiv/status-files.pdf +++ b/tex/context/base/mkiv/status-files.pdf diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf Binary files differindex 256f66ef8..27fb6a984 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf diff --git a/tex/context/base/mkiv/strc-ref.lua b/tex/context/base/mkiv/strc-ref.lua index 4203e6aac..bca36ccef 100644 --- a/tex/context/base/mkiv/strc-ref.lua +++ b/tex/context/base/mkiv/strc-ref.lua @@ -2615,9 +2615,10 @@ implement { -- } implement { - name = "askedreference", - public = true, - actions = function() + name = "askedreference", + public = true, + protected = true, + actions = function() local actions = references.currentset if actions then context("[p=%s,r=%s]",actions.prefix or "",actions.reference) |