diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-06-02 23:03:30 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-06-02 23:03:30 +0200 |
commit | 2bca80bc96d0182956e57c51b5d4977f714bed5c (patch) | |
tree | e0edb360bc5de3067487bcbb31eb040f696e2853 /tex/context/base/mkiv/font-ext.lua | |
parent | a274872832cdd1e71ce4b019858c61c5a77c6b98 (diff) | |
download | context-2bca80bc96d0182956e57c51b5d4977f714bed5c.tar.gz |
2016-06-02 21:33:00
Diffstat (limited to 'tex/context/base/mkiv/font-ext.lua')
-rw-r--r-- | tex/context/base/mkiv/font-ext.lua | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/tex/context/base/mkiv/font-ext.lua b/tex/context/base/mkiv/font-ext.lua index 61e8c8179..7ab11ffb0 100644 --- a/tex/context/base/mkiv/font-ext.lua +++ b/tex/context/base/mkiv/font-ext.lua @@ -36,6 +36,7 @@ local fontdata = hashes.identifiers local allocate = utilities.storage.allocate local settings_to_array = utilities.parsers.settings_to_array local getparameters = utilities.parsers.getparameters +local gettexdimen = tex.getdimen local setmetatableindex = table.setmetatableindex @@ -625,12 +626,20 @@ local function manipulatedimensions(tfmdata,key,value) if type(value) == "string" and value ~= "" then local characters = tfmdata.characters local parameters = tfmdata.parameters - local emwidth = parameters.quad - local exheight = parameters.xheight - local spec = settings_to_array(value) - local width = (spec[1] or 0) * emwidth - local height = (spec[2] or 0) * exheight - local depth = (spec[3] or 0) * exheight + local emwidth = parameters.quad + local exheight = parameters.xheight + local width = 0 + local height = 0 + local depth = 0 + if value == "strut" then + height = gettexdimen("strutht") + depth = gettexdimen("strutdp") + else + local spec = settings_to_array(value) + width = (spec[1] or 0) * emwidth + height = (spec[2] or 0) * exheight + depth = (spec[3] or 0) * exheight + end if width > 0 then local resources = tfmdata.resources local additions = { } @@ -687,7 +696,7 @@ local function manipulatedimensions(tfmdata,key,value) elseif height > 0 and depth > 0 then for unicode, old_c in next, characters do old_c.height = height - old_c.depth = depth + old_c.depth = depth end elseif height > 0 then for unicode, old_c in next, characters do |