Menu

#942 Incorrect metric for TrueType characters > 0x7f with ANSI encoding

v1.0_(example)
closed
nobody
None
1
2014-07-07
2014-06-25
radekg
No

tcpdf_addfont.php (tcpdf 6.0.85) incorrectly generates TTF font metrics (or incorrectly translates encoding) for characters above 0x7f.
After creating font file with "php ../tools/tcpdf_addfont.php -e cp1250 -t TrueType -i cambriai.ttf" (Windows 7 font Cambria Italic), indcices in variable $cw in output file (cambriai.php) are not translated. For example, for there is entry "347=>382" (U+01B5) instead of "156=>382" (Ox9C).
After replacing Unicode indices with CP1520 ones, everything seems to work.

Discussion

  • Nicola Asuni

    Nicola Asuni - 2014-06-26

    The $cw variable should contain all indexes from 0 to 255.
    The $cw keys are the glyph IDs, while the value is the glyph width.
    In your case, are you saying that the widths are wrong? Are assigned to the wrong indexes?

     
  • Nicola Asuni

    Nicola Asuni - 2014-07-07

    Closing because lack of information: this bug is poorly described.

     
  • Nicola Asuni

    Nicola Asuni - 2014-07-07
    • status: open --> closed
     

Log in to post a comment.