Skip to content

On OSX servo shows CJK chars as squares #10045

Closed

Description

@bobchao

2016-03-17 12 12 45

<ul>
  <li>C 中文</li>
  <li>J 日本語</li>
  <li>K 한국어</li>
</ul>

Activity

  1. bobchao commented on Mar 17, 2016

    @bobchao
    Author

    On Linux it works well (humm, not that "well" on the layout part but at least it shows the chars correctly)

    photo186463213883336655

  2. frewsxcv commented on Mar 17, 2016

    @frewsxcv
    Contributor

    Possibly related to #7762

  3. hiroshiyui commented on Mar 18, 2016

    @hiroshiyui

    I can reproduce such square (or so-called "tofu") font issue on my system, which runs:

    • Arch Linux x86-64, Linux kernel 4.4.5
    • KDE Plasma 5.5.5
    • Servo (built from the latest source code on Git)

    Just found that if I change my fonts fallback order in Fontconfig, to set the first candidate font from "Noto Sans" to "Noto Sans CJK TC", then almost all CJK characters are shown as expected.

  4. Artoria2e5 commented on Mar 18, 2016

    @Artoria2e5

    This problem is in a form somehow like this libgdiplus bug (well, in the "Sans" case), where libgdiplus didn't consider any possible extra fontconfig substitutes and only used the first match. Some system-based fallback is necessary…

    As a temporary hack, perhaps last_resort_font_families() can be set according to glyph coverage instead? It looks like OS X users can try stealing Arial Unicode MS from Windows for now, but there's nothing except for font name hacks for FreeType users.

    Some extra generalized test cases:

    • try to show emojis using sans-serif with Noto Emoji installed and available in fc-match -a "sans-serif" | grep Emoji
    • use any other rare scripts (e.g. Powerline PUA symbols) that requires a not-specified-in-CSS on-system fallback font.

    #7762 and #9479 sound more like webfont failures. (And GitHub has switched to SVG icons.)

  5. mmatyas commented on May 5, 2016

    @mmatyas
    Contributor

    Does not work for me either, on Xubuntu nor GNOME, 15.10:

    kepernyokep_2016-05-05_14-28-48

  6. Artoria2e5 commented on May 5, 2016

    @Artoria2e5

    @mmatyas If you are reporting such cases on LInux, mentioning the output of fc-match Sans can help confirm @hiroshiyui's report (and my guess).

  7. mmatyas commented on May 5, 2016

    @mmatyas
    Contributor

    fc-match Sans returns DejaVuSans.ttf: "DejaVu Sans" "Book" for me.
    Here's the full output of fc-match -a "sans-serif": http://pastebin.com/afMmsaUT, hope this helps.

  8. saschanaz commented on Aug 15, 2016

    @saschanaz
    Contributor

    CJK also is being displayed as squares on Windows nightly build. Should I open a new issue for Windows build?

    image

  9. nox commented on Sep 30, 2017

    @nox
    Contributor

    The characters are displayed correctly on macOS.

  10. mmatyas commented on Oct 1, 2017

    @mmatyas
    Contributor

    Still failing on Ubuntu 16.04 and also on Solus 3 as of 2017-10-01, using the 64bit Linux build from servo.org

    kepernyokep_2017-10-01_23-06-31

  11. Artoria2e5 commented on Oct 1, 2017

    @Artoria2e5

    Probably nox's working report is caused by ja.wp somehow making a Japanese font the first (and only, for now) option. Make some other test cases to reopen it I guess?

  12. reopened this on Oct 1, 2017
  13. jdm commented on Oct 1, 2017

    @jdm
    Member

    Yeah, some links to reproduce the problem would be great.

  14. tigercosmos commented on Nov 15, 2017

    @tigercosmos
    Contributor

    @jdm I think Labels should also add Linux. (#19228)

  15. removed
    P-mac
    on Nov 15, 2017
  16. jdm commented on Feb 14, 2020

    @jdm
    Member

    I've tested some of the earlier examples on macOS and they appear to render correctly. Please file new issues with testcases or links to sites that do not non-english characters correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions