Hangul glyphs in "WenQuanYi Micro Hei" overlap one another in Chromium (incorrect advanceWidth in hmtx table)

Bug #1258520 reported by Anthony Fok on 2013-12-06
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
ttf-wqy-microhei (Debian)
Fix Released
Unknown
ttf-wqy-microhei (Ubuntu)
Undecided
Unassigned

Bug Description

Hangul glyphs stack on top of one another, and hence unreadable, especially in Chromium browser.

See:

* https://code.google.com/p/chromium/issues/detail?id=85890
    "WenQuanYi Micro Hei" is rendered incorrectly on Linux (2011-06-13)

* https://sourceforge.net/p/wqy/bugs/42/
    WenQuanYiMicroHei hangul advance
    (an anonymous user reported the problem upstream on 2013-03-29)

* https://code.google.com/p/chromium/issues/detail?id=233851
    korean fonts stacking vertically onto eachother and/or replaced with pinyin
    after updating to linux raring ringtail 13.04 (2013-04-19)

* http://bugs.debian.org/714641
    ttf-wqy-microhei: Incorrect advanceWidths in hmtx for composite glyphs.
    (with a suggested fix)

Using FontTools/TTX for analysis, e.g. by running:

    ttx -x glyf -y 0 wqy-microhei.ttc

an XML file is generated, showing the following Horizontal Matrix table:

  <hmtx>
    ...
    <mtx name="uni9FC0" width="2048" lsb="104"/>
    <mtx name="uni9FC1" width="2048" lsb="96"/>
    <mtx name="uni9FC2" width="2048" lsb="104"/>
    <mtx name="uni9FC3" width="2048" lsb="112"/>
    <mtx name="uniAC00" width="256" lsb="128"/>
    <mtx name="uniAC01" width="256" lsb="112"/>
    <mtx name="uniAC02" width="256" lsb="112"/>
    <mtx name="uniAC03" width="256" lsb="112"/>
    <mtx name="uniAC04" width="256" lsb="112"/>
    ...
    <mtx name="uniAC6E" width="256" lsb="72"/>
    <mtx name="uniAC6F" width="256" lsb="72"/>
    <mtx name="uniAC70" width="2048" lsb="88"/>
    <mtx name="uniAC71" width="256" lsb="72"/>
    <mtx name="uniAC72" width="256" lsb="72"/>
    ...
    <mtx name="uniACA6" width="256" lsb="72"/>
    <mtx name="uniACA7" width="256" lsb="72"/>
    <mtx name="uniACA8" width="2048" lsb="88"/>
    <mtx name="uniACA9" width="256" lsb="72"/>
    <mtx name="uniACAA" width="256" lsb="72"/>
    ...
    <mtx name="uniD7A1" width="256" lsb="168"/>
    <mtx name="uniD7A2" width="256" lsb="168"/>
    <mtx name="uniD7A3" width="256" lsb="168"/>
    <mtx name="uniF900" width="256" lsb="136"/>
    <mtx name="uniF901" width="2048" lsb="104"/>
    <mtx name="uniF902" width="2048" lsb="104"/>
    <mtx name="uniF903" width="256" lsb="168"/>
    <mtx name="uniF904" width="256" lsb="88"/>
    <mtx name="uniF905" width="2048" lsb="216"/>
    <mtx name="uniF906" width="2048" lsb="128"/>
    <mtx name="uniF907" width="2048" lsb="96"/>
    <mtx name="uniF908" width="2048" lsb="96"/>
    <mtx name="uniF909" width="256" lsb="80"/>
    <mtx name="uniF90A" width="2048" lsb="80"/>
    <mtx name="uniF90B" width="256" lsb="160"/>
    <mtx name="uniF90C" width="256" lsb="104"/>
    <mtx name="uniF90D" width="256" lsb="80"/>
    <mtx name="uniF90E" width="2048" lsb="72"/>
    <mtx name="uniF90F" width="256" lsb="96"/>
    <mtx name="uniF910" width="256" lsb="128"/>
    <mtx name="uniF911" width="256" lsb="128"/>
    ...
    <mtx name="uniFA25" width="2048" lsb="96"/>
    <mtx name="uniFA26" width="256" lsb="104"/>
    <mtx name="uniFA27" width="256" lsb="88"/>
    <mtx name="uniFA28" width="256" lsb="88"/>
    <mtx name="uniFA29" width="256" lsb="168"/>
    <mtx name="uniFA2A" width="2048" lsb="80"/>
    <mtx name="uniFA2B" width="256" lsb="80"/>
    <mtx name="uniFA2C" width="2048" lsb="80"/>
    <mtx name="uniFA2D" width="256" lsb="48"/>
    ...
  </hmtx>

Apparently, WenQuanYi Micro Hei uses a horizontal advance width of 2048 for CJK characters by default, e.g.:

    <mtx name="uni9FC0" width="2048" lsb="104"/>
    <mtx name="uni9FC1" width="2048" lsb="96"/>
    <mtx name="uni9FC2" width="2048" lsb="104"/>
    <mtx name="uni9FC3" width="2048" lsb="112"/>

whereas DroidSansFallback.ttf uses a horizontal advance width of 256 for CJK characters by default.

Perhaps something went wrong when the Hangul (and related Korean Han fallback glyphs) from DroidSansFallback.ttf were merged into WenQuanYi Micro Hei?

Related branches

Anthony Fok (foka) on 2013-12-06
no longer affects: chromium-browser
Anthony Fok (foka) on 2013-12-06
description: updated
no longer affects: chromium-browser
Changed in ttf-wqy-microhei (Debian):
status: Unknown → New
Anthony Fok (foka) on 2013-12-07
Changed in ttf-wqy-microhei (Ubuntu):
status: New → Confirmed
Changed in ttf-wqy-microhei (Debian):
status: New → Confirmed
Changed in ttf-wqy-microhei (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.