Wkhtmltopdf: Lang attribute is ingored

Created on 2 Dec 2016  Â·  4Comments  Â·  Source: wkhtmltopdf/wkhtmltopdf

Hi All,

I'm using wkhtmltopdf 0.12.4 (with patched qt) and trying to render a document that contains _Traditional Chinese_, _Simplified Chinese_, _Japanese_ and _Korean_.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html>
  <body>
    <div lang="ja">Ja: &#x4E0E; &#x624D; &#x9AA8;</div>
    <div lang="zh-Hant">Hant:&#x4E0E; &#x624D; &#x9AA8;</div>
    <div lang="zh-Hans">Hans: &#x4E0E; &#x624D; &#x9AA8;</div>
    <div lang="ko">Ko: &#x4E0E; &#x624D; &#x9AA8;</div>
    <div>Emoji: &#x1f4a9;</div>
  </body>
</html>

Opening this document with Chrome I can see that each div is rendered using a different set of fonts. This is right since the same codepoints are rendered in different ways according to the language (https://en.wikipedia.org/wiki/Han_unification)

screen shot 2016-12-02 at 6 07 48 pm

The same HTML rendered with wkhtmltopdf do not give the same result (neither on Linux nor on Mac OSX). As you can see the same font is used to render all the divs which means that the lang tag is totally ignored (and the Emoji is totally messed up)

screen shot 2016-12-02 at 6 12 21 pm

Is there any way to address this issue?

NeedInfo

Most helpful comment

有关此问题的任何更新?
EN: Any updates about this issue?

All 4 comments

有关此问题的任何更新?
EN: Any updates about this issue?

Is this still an issue in 0.12.5?

Is this still an issue in 0.12.5?

I can still reproduce this issue with 0.12.5

Any updates on this?

Was this page helpful?
0 / 5 - 0 ratings