Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On OSX servo shows CJK chars as squares #10045

Closed
bobchao opened this issue Mar 17, 2016 · 14 comments
Closed

On OSX servo shows CJK chars as squares #10045

bobchao opened this issue Mar 17, 2016 · 14 comments

Comments

@bobchao
Copy link

@bobchao bobchao commented Mar 17, 2016

2016-03-17 12 12 45

<ul>
  <li>C 中文</li>
  <li>J 日本語</li>
  <li>K 한국어</li>
</ul>
@bobchao
Copy link
Author

@bobchao bobchao commented Mar 17, 2016

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

photo186463213883336655

@frewsxcv
Copy link
Member

@frewsxcv frewsxcv commented Mar 17, 2016

Possibly related to #7762

@hiroshiyui
Copy link

@hiroshiyui hiroshiyui commented Mar 18, 2016

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.

@Artoria2e5
Copy link

@Artoria2e5 Artoria2e5 commented Mar 18, 2016

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.)

@mmatyas
Copy link
Contributor

@mmatyas mmatyas commented May 5, 2016

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

kepernyokep_2016-05-05_14-28-48

@Artoria2e5
Copy link

@Artoria2e5 Artoria2e5 commented May 5, 2016

@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).

@mmatyas
Copy link
Contributor

@mmatyas mmatyas commented May 5, 2016

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.

@saschanaz
Copy link
Contributor

@saschanaz saschanaz commented Aug 15, 2016

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

image

@nox
Copy link
Member

@nox nox commented Sep 30, 2017

The characters are displayed correctly on macOS.

@nox nox closed this Sep 30, 2017
@mmatyas
Copy link
Contributor

@mmatyas mmatyas commented Oct 1, 2017

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

@Artoria2e5
Copy link

@Artoria2e5 Artoria2e5 commented Oct 1, 2017

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?

@jdm jdm reopened this Oct 1, 2017
@jdm
Copy link
Member

@jdm jdm commented Oct 1, 2017

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

@tigercosmos
Copy link
Collaborator

@tigercosmos tigercosmos commented Nov 15, 2017

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

@jdm jdm removed the P-mac label Nov 15, 2017
@jdm
Copy link
Member

@jdm jdm commented Feb 14, 2020

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.

@jdm jdm closed this Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.