From ce418e183f6fed281940def9b848258c8b25916e Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 10 May 2013 16:34:12 +0200 Subject: [rfc] proposal for font name fallback --- luaotfload-auxiliary.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/luaotfload-auxiliary.lua b/luaotfload-auxiliary.lua index c08f775..8d12d11 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 stringmatch = string.match ----------------------------------------------------------------------- --- font patches @@ -64,6 +65,9 @@ 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 local resources = fontdata.resources --- the next line is a hack that fixes scaling of fonts with @@ -98,8 +102,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, -- cgit v1.2.3