summaryrefslogtreecommitdiff
path: root/luaotfload-auxiliary.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-05-10 08:41:40 -0700
committerPhilipp Gesang <phg42.2a@gmail.com>2013-05-10 08:41:40 -0700
commite6b84660875c89de138ebc0e9c9e9e9dbaa6db76 (patch)
tree99b248d6f16a9d226b5d33ac15a625baa7c87662 /luaotfload-auxiliary.lua
parentfb67cecbfa8707ece8d26f256b104616dc5810ee (diff)
parent2d352121cddf97e8249c72b58738cb2ede1b1557 (diff)
downloadluaotfload-e6b84660875c89de138ebc0e9c9e9e9dbaa6db76.tar.gz
Merge pull request #58 from phi-gamma/master
sync; various fixes (node mode, manual etc.)
Diffstat (limited to 'luaotfload-auxiliary.lua')
-rw-r--r--luaotfload-auxiliary.lua12
1 files changed, 5 insertions, 7 deletions
diff --git a/luaotfload-auxiliary.lua b/luaotfload-auxiliary.lua
index c08f775..be380e3 100644
--- a/luaotfload-auxiliary.lua
+++ b/luaotfload-auxiliary.lua
@@ -31,6 +31,7 @@ local stringlower = string.lower
local stringformat = string.format
local stringgsub = string.gsub
local stringbyte = string.byte
+local stringfind = string.find
-----------------------------------------------------------------------
--- font patches
@@ -64,18 +65,17 @@ local add_fontdata_fallbacks = function (fontdata)
else --- otf
metadata = fontdata.shared.rawdata.metadata
+ fontdata.name = fontdata.name
+ or fontdata.fullname
+ or fontdata.psname
fontdata.units = fontdata.units_per_em
+ fontdata.size = fontdata.size or fontparameters.size
local resources = fontdata.resources
- --- the next line is a hack that fixes scaling of fonts with
- --- non-standard em-sizes (most ms fonts have 2048, others
- --- come with 256)
- --fontdata.size = fontparameters.size * fontdata.units / 1000
--- for legacy fontspec.lua and unicode-math.lua
fontdata.shared.otfdata = {
pfminfo = { os2_capheight = metadata.pfminfo.os2_capheight },
metadata = { ascent = metadata.ascent },
}
- --fontdata.shared.otfdata.metadata = metadata --- brr, that’s meta indeed
--- for microtype and fontspec
local fake_features = { } -- wrong: table.copy(resources.features)
setmetatable(fake_features, { __index = function (tab, idx)
@@ -98,8 +98,6 @@ end
--if config.luaotfload.compatibility == true then
if true then
- --- this will cause the output pdf to be garbled
- --- in pdf.js
luatexbase.add_to_callback(
"luaotfload.patch_font",
add_fontdata_fallbacks,