diff options
author | Hans Hagen <pragma@wxs.nl> | 2014-10-07 11:14:00 +0530 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2014-10-07 11:14:00 +0530 |
commit | ccdd2d9e98ac3bbf794eefd5a42ed063832a61b3 (patch) | |
tree | 6d4ce4ebf4876b443cdb40cfa74caf7970c61ebe /tex/context/base/typo-tal.lua | |
parent | 2b89b4ede02fd02fe66597e9c314dbfcfa4c0ecb (diff) | |
download | context-ccdd2d9e98ac3bbf794eefd5a42ed063832a61b3.tar.gz |
beta 2014.10.07 11:14
Diffstat (limited to 'tex/context/base/typo-tal.lua')
-rw-r--r-- | tex/context/base/typo-tal.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tex/context/base/typo-tal.lua b/tex/context/base/typo-tal.lua index 1e9c815b3..d41a63dd5 100644 --- a/tex/context/base/typo-tal.lua +++ b/tex/context/base/typo-tal.lua @@ -12,6 +12,8 @@ if not modules then modules = { } end modules ['typo-tal'] = { -- Currently we have two methods: text and number with some downward compatible -- defaulting. +-- We can speed up by saving the current fontcharacters[font] + lastfont. + local next, type = next, type local div = math.div local utfbyte = utf.byte @@ -23,7 +25,7 @@ local glyph_code = nodecodes.glyph local glue_code = nodecodes.glue local fontcharacters = fonts.hashes.characters -local unicodes = fonts.hashes.unicodes +----- unicodes = fonts.hashes.unicodes local categories = characters.categories -- nd local variables = interfaces.variables @@ -135,7 +137,8 @@ function characteralign.handler(originalhead,where) if id == glyph_code then local char = getchar(current) local font = getfont(current) - local unicode = unicodes[font][char] + -- local unicode = unicodes[font][char] + local unicode = fontcharacters[font][char].unicode or char -- ignore tables if not unicode then -- no unicode so forget about it elseif unicode == separator then @@ -213,7 +216,8 @@ function characteralign.handler(originalhead,where) if id == glyph_code then local char = getchar(current) local font = getfont(current) - local unicode = unicodes[font][char] + -- local unicode = unicodes[font][char] + local unicode = fontcharacters[font][char].unicode or char -- ignore tables if not unicode then -- no unicode so forget about it elseif unicode == separator then |