View Issue Details

IDProjectCategoryView StatusLast Update
0000944luatexluatex bugpublic2016-03-07 14:11
ReporterDirtY iCE Assigned ToHans Hagen  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformLinux 
Target Version0.90.0Fixed in Version0.90.0 
Summary0000944: wrong glyph mapping with updated IPAex font from texlive 2015
DescriptionBetween texlive 2014 and 2015 the bundled ipaex font was updated, and the updated font produces invalid maps in font.map.map. For example, WAVE DASH (0x301c, 〜) is aliased to FULLWIDTH TILDE (0xff5e, ~) in this font. With the 2014 fonts everything is fine, but with 2015 the former one is replaced with a ‖ character in the pdf output (the fullwidth tilde works fine, thought).
Steps To Reproduce\documentclass{ltjbook}
\begin{document}
〜~
\end{document}

But digging a bit deeper, take this lua script:

local f = fontloader.open(arg[1])
print(f.version)
print(f.table_version)
for i=0,f.glyphmax do
  local g = f.glyphs[i]
  if g.unicode == 0xff5e or g.unicode == 0x301c then
    local fs = fontloader.fields(g)
    for _,k in ipairs(fs) do
      print(i,k,g[k])
    end
  end
end

print("---")
for k,v in pairs(f.map.map) do
  if k == 0x301c or k == 0xff5e then
    print(k,v)
  end
end

Execute it with luatex --luaonly foo.lua path_to/ipaexm.ttf

With the old (texlive-2014) fonts I get the following output:
001.03
0.4
431 name aj665
431 unicode 65374
431 boundingbox table: 0x274d6e0
431 vwidth 2048
431 width 2048
431 lsidebearing 190
431 class base
431 kerns nil
431 vkerns nil
431 dependents nil
431 lookups table: 0x274d7f0
431 ligatures nil
431 comment nil
431 anchors nil
431 altuni nil
431 tex_height nil
431 tex_depth nil
431 is_extended_shape 0
431 italic_correction nil
431 top_accent nil
431 vert_variants nil
431 horiz_variants nil
431 mathkern nil
431 orig_pos 431
---
12316 431
65374 431

It looks like the fullwidth title glyph position is at 431, and the map correctly lists it for both 0x301c and 0xff5e. But with the 2015 fonts:
002.01
0.4
431 name aj665
431 unicode 65374
431 boundingbox table: 0x37bee30
431 vwidth 2048
431 width 2048
431 lsidebearing 190
431 class base
431 kerns nil
431 vkerns nil
431 dependents nil
431 lookups table: 0x37bef40
431 ligatures nil
431 comment nil
431 anchors nil
431 altuni nil
431 tex_height nil
431 tex_depth nil
431 is_extended_shape 0
431 italic_correction nil
431 top_accent nil
431 vert_variants nil
431 horiz_variants nil
431 mathkern nil
431 orig_pos 431
---
12316 432
65374 432

The tilde is still at 431, but the map shows 432. Actually it looks like every entry in the map equals the correct entry + 1. Most characters work though as it looks like glyph.unicode have a precedence over the font.map.map
TagsNo tags attached.

Activities

Hans Hagen

2015-11-11 15:00

manager   ~0001541

has to do with .notdef ... maybe no need to fix if the font is crap

Hans Hagen

2016-03-07 14:11

manager   ~0001595

fixed with other fixes ... we no longer compensate for missing .notdef glyphs in broken fonts at the lua end: there you get what you asked for (there is a notdef_loc key now that can be consulted)

Issue History

Date Modified Username Field Change
2015-08-14 19:03 DirtY iCE New Issue
2015-10-23 09:09 Hans Hagen Fixed in Version => maybe never (> v 1)
2015-10-23 09:09 Hans Hagen Fixed in Version maybe never (> v 1) =>
2015-10-23 09:09 Hans Hagen Target Version => maybe never (> v 1)
2015-10-23 09:10 Hans Hagen Target Version maybe never (> v 1) =>
2015-10-24 21:02 Hans Hagen Status new => acknowledged
2015-11-11 14:59 Hans Hagen Assigned To => Taco
2015-11-11 14:59 Hans Hagen Status acknowledged => assigned
2015-11-11 15:00 Hans Hagen Note Added: 0001541
2015-11-11 15:00 Hans Hagen Target Version => 0.90.0
2016-03-07 14:11 Hans Hagen Note Added: 0001595
2016-03-07 14:11 Hans Hagen Status assigned => closed
2016-03-07 14:11 Hans Hagen Assigned To Taco => Hans Hagen
2016-03-07 14:11 Hans Hagen Resolution open => fixed
2016-03-07 14:11 Hans Hagen Fixed in Version => 0.90.0