diff options
author | Philipp Gesang <phg42.2a@gmail.com> | 2014-12-14 12:29:58 +0100 |
---|---|---|
committer | Philipp Gesang <phg42.2a@gmail.com> | 2014-12-14 12:29:58 +0100 |
commit | c029158f450cd96f71db2f2a4da72a5c946089c0 (patch) | |
tree | 1c5d30d6853f6deb57cc9818b8739106a2d5e03f /src/fontloader/misc/fontloader-math.lua | |
parent | ea148be27d5a79fd11759856e0ab4033f328ce5a (diff) | |
parent | ca673f7b14af906606a188fd98978d3501842f63 (diff) | |
download | luaotfload-c029158f450cd96f71db2f2a4da72a5c946089c0.tar.gz |
Merge pull request #260 from phi-gamma/master
add import helper, new directory layout, revised letterspacing, fontloader gone nuts
Diffstat (limited to 'src/fontloader/misc/fontloader-math.lua')
-rw-r--r-- | src/fontloader/misc/fontloader-math.lua | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/fontloader/misc/fontloader-math.lua b/src/fontloader/misc/fontloader-math.lua new file mode 100644 index 0000000..c316182 --- /dev/null +++ b/src/fontloader/misc/fontloader-math.lua @@ -0,0 +1,53 @@ +if not modules then modules = { } end modules ['luatex-math'] = { + version = 1.001, + comment = "companion to luatex-math.tex", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +local gaps = { + [0x1D455] = 0x0210E, + [0x1D49D] = 0x0212C, + [0x1D4A0] = 0x02130, + [0x1D4A1] = 0x02131, + [0x1D4A3] = 0x0210B, + [0x1D4A4] = 0x02110, + [0x1D4A7] = 0x02112, + [0x1D4A8] = 0x02133, + [0x1D4AD] = 0x0211B, + [0x1D4BA] = 0x0212F, + [0x1D4BC] = 0x0210A, + [0x1D4C4] = 0x02134, + [0x1D506] = 0x0212D, + [0x1D50B] = 0x0210C, + [0x1D50C] = 0x02111, + [0x1D515] = 0x0211C, + [0x1D51D] = 0x02128, + [0x1D53A] = 0x02102, + [0x1D53F] = 0x0210D, + [0x1D545] = 0x02115, + [0x1D547] = 0x02119, + [0x1D548] = 0x0211A, + [0x1D549] = 0x0211D, + [0x1D551] = 0x02124, +} + + +local function fixmath(tfmdata,key,value) + if value then + local characters = tfmdata.characters + for gap, mess in pairs(gaps) do + characters[gap] = characters[mess] + end + end +end + +fonts.handlers.otf.features.register { + name = "fixmath", + description = "math font fixing", + manipulators = { + base = fixmath, + node = fixmath, + } +} |