summaryrefslogtreecommitdiff
path: root/texmf-dist/tex/generic/harftex/harf-base.lua
blob: 4b5931fdba29e571e11d2b0ca76f31e22d0c29d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
local hb = require("luaharfbuzz")

-- LuaTeX’s TFM structure indexes glyphs by character codes, so we fake it by
-- adding the maximum possible Unicode code point to the glyph id. This way
-- we have a simple mapping for all glyphs without interfering with any valid
-- Unicode code point.
--
-- LuaTeX use the first 256 characters above maximum Unicode character for
-- escaping raw bytes, so skip that as well.
hb.CH_GID_PREFIX = 0x110000 + 256

return hb