[latex3-commits] [git/LaTeX3-latex3-luaotfload] dev: Simpler and more uniform embolden handling (f908b08)
Marcel Fabian Krüger
tex at 2krueger.de
Sun Feb 9 16:01:40 CET 2020
Repository : https://github.com/latex3/luaotfload
On branch : dev
Link : https://github.com/latex3/luaotfload/commit/f908b0812c0e7343b33b058a492c684ea68cc647
>---------------------------------------------------------------
commit f908b0812c0e7343b33b058a492c684ea68cc647
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date: Sun Feb 9 16:01:40 2020 +0100
Simpler and more uniform embolden handling
>---------------------------------------------------------------
f908b0812c0e7343b33b058a492c684ea68cc647
src/luaotfload-embolden.lua | 13 +++----------
src/luaotfload-harf-define.lua | 12 ------------
2 files changed, 3 insertions(+), 22 deletions(-)
diff --git a/src/luaotfload-embolden.lua b/src/luaotfload-embolden.lua
index 47725ab..c938dbe 100644
--- a/src/luaotfload-embolden.lua
+++ b/src/luaotfload-embolden.lua
@@ -18,24 +18,17 @@ end
local otffeatures = fonts.constructors.newfeatures "otf"
-local function setembolden(tfmdata, factor)
- tfmdata.embolden = factor
-end
-
-local function enableembolden(tfmdata)
- tfmdata.mode, tfmdata.width = 2, tfmdata.size*tfmdata.unscaled.embolden/6578.176
+local function enableembolden(tfmdata, _, embolden)
+ tfmdata.mode, tfmdata.width = 2, tfmdata.size*embolden/6578.176
end
otffeatures.register {
name = "embolden",
description = "embolden",
- initializers = {
- base = setembolden,
- node = setembolden,
- },
manipulators = {
base = enableembolden,
node = enableembolden,
+ plug = enableembolden,
}
}
diff --git a/src/luaotfload-harf-define.lua b/src/luaotfload-harf-define.lua
index 6613275..6b10655 100644
--- a/src/luaotfload-harf-define.lua
+++ b/src/luaotfload-harf-define.lua
@@ -293,16 +293,6 @@ local function scalefont(data, spec)
slantfactor = tonumber(features.slant) * 1000
end
- local mode = nil
- local width = nil
- if features.embolden then
- mode = 2
- -- The multiplication by 7200.0/7227 is to undo the opposite conversion
- -- the engine is doing and make the final number written in the PDF file
- -- match XeTeX’s.
- width = (size * tonumber(features.embolden) / 6553.6) * (7200.0/7227)
- end
-
local hscale = upem
local extendfactor = nil
if features.extend then
@@ -341,8 +331,6 @@ local function scalefont(data, spec)
nomath = true,
format = data.fonttype,
slant = slantfactor,
- mode = mode,
- width = width,
extend = extendfactor,
squeeze = squeezefactor,
characters = characters,
More information about the latex3-commits
mailing list.