diff options
Diffstat (limited to 'tex/context/base/mkiv/font-ots.lua')
-rw-r--r-- | tex/context/base/mkiv/font-ots.lua | 65 |
1 files changed, 37 insertions, 28 deletions
diff --git a/tex/context/base/mkiv/font-ots.lua b/tex/context/base/mkiv/font-ots.lua index c37008d0e..c4f89c156 100644 --- a/tex/context/base/mkiv/font-ots.lua +++ b/tex/context/base/mkiv/font-ots.lua @@ -4235,9 +4235,26 @@ registerotffeature { } } +-- Moved here (up) a bit. This doesn't really belong in generic so it will +-- move to a context module some day. + +local function markinitializer(tfmdata,value) + local properties = tfmdata.properties + properties.checkmarks = value +end + +registerotffeature { + name = "checkmarks", + description = "check mark widths", + default = true, + initializers = { + node = markinitializer, + }, +} + -- This can be used for extra handlers, but should be used with care! We implement one -- here but some more can be found in the osd (script devanagary) file. Now watch out: --- when a handlers has steps, it is called as the other ones, but when we have no steps, +-- when a handler has steps, it is called as the other ones, but when we have no steps, -- we use a different call: -- -- function(head,dataset,sequence,initialrl,font,attr) @@ -4248,22 +4265,28 @@ registerotffeature { otf.handlers = handlers +if context then + return +else + -- todo: move the following code someplace else +end + local setspacekerns = nodes.injections.setspacekerns if not setspacekerns then os.exit() end -local tag = "kern" -- maybe some day a merge +local tag = "kern" -if fontfeatures then +-- if fontfeatures then - function handlers.trigger_space_kerns(head,dataset,sequence,initialrl,font,attr) - local features = fontfeatures[font] - local enabled = features and features.spacekern and features[tag] - if enabled then - setspacekerns(font,sequence) - end - return head, enabled - end +-- function handlers.trigger_space_kerns(head,dataset,sequence,initialrl,font,attr) +-- local features = fontfeatures[font] +-- local enabled = features and features.spacekern and features[tag] +-- if enabled then +-- setspacekerns(font,sequence) +-- end +-- return head, enabled +-- end -else -- generic (no hashes) +-- else -- generic (no hashes) function handlers.trigger_space_kerns(head,dataset,sequence,initialrl,font,attr) local shared = fontdata[font].shared @@ -4275,7 +4298,7 @@ else -- generic (no hashes) return head, enabled end -end +-- end -- There are fonts out there that change the space but we don't do that kind of -- things in TeX. @@ -4393,7 +4416,7 @@ local function spaceinitializer(tfmdata,value) -- attr if rules then -- not now: analyze (simple) rules elseif not coverage then - -- nothng to do + -- nothing to do elseif kind == "gpos_single" then -- makes no sense in TeX elseif kind == "gpos_pair" then @@ -4477,17 +4500,3 @@ registerotffeature { node = spaceinitializer, }, } - -local function markinitializer(tfmdata,value) - local properties = tfmdata.properties - properties.checkmarks = value -end - -registerotffeature { - name = "checkmarks", - description = "check mark widths", - default = true, - initializers = { - node = markinitializer, - }, -} |