summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-embolden.lua
blob: d1d4e478c82f18763afd03e475fc0ffcae2470a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
-----------------------------------------------------------------------
--         FILE:  luaotfload-embolden.lua
--  DESCRIPTION:  part of luaotfload / embolden
-----------------------------------------------------------------------

local ProvidesLuaModule = { 
    name          = "luaotfload-embolden",
    version       = "3.15",       --TAGVERSION
    date          = "2020-09-02", --TAGDATE
    description   = "luaotfload submodule / embolden",
    license       = "GPL v2.0",
    author        = "Marcel Krüger"
}

if luatexbase and luatexbase.provides_module then
  luatexbase.provides_module (ProvidesLuaModule)
end  

local otffeatures        = fonts.constructors.newfeatures "otf"

local function enableembolden(tfmdata, _, embolden)
  tfmdata.mode, tfmdata.width = 2, tfmdata.size*embolden/6578.176
end

otffeatures.register {
  name        = "embolden",
  description = "embolden",
  manipulators = {
    base = enableembolden,
    node = enableembolden,
    plug = enableembolden,
  }
}

--- vim:sw=2:ts=2:expandtab:tw=71