Forum Bugs

Noto Sans Japanese Google font not appearing?

jasongladish
I have a minimal test case attached of trying to use a particular japanese font. In the resulting PDF the japanese don't show up, though.

The Prince log seems to indicate the font is being used:
inf||loading style sheet: https://fonts.googleapis.com/earlyaccess/notosansjapanese.css
dbg||[prefetch-1] loaded https://fonts.googleapis.com/earlyaccess/notosansjapanese.css
dbg||loaded resource: https://fonts.googleapis.com/earlyaccess/notosansjapanese.css
dbg||loaded resource: type: yes(resource_type("text/css", ["charset" - "utf-8"], css, yes(utf8)))
Preparing document...
dbg||stopping prefetch threads
Converting document...
dbg||pack
0
dbg||font request: Noto Sans Japanese, sans-serif
dbg||scan fonts: Arial
dbg||found font: Arial Regular
dbg||found font: Arial Italic
dbg||found font: Arial Bold
dbg||found font: Arial Bold Italic
dbg||scan fonts: Symbol
dbg||found font: Symbol Regular
dbg||scan fonts: LiHei Pro
dbg||found font: LiHei Pro Medium
dbg||scan fonts: Times New Roman
dbg||found font: Times New Roman Regular
dbg||found font: Times New Roman Italic
dbg||found font: Times New Roman Bold
dbg||found font: Times New Roman Bold Italic
dbg||scan fonts: LiSong Pro
dbg||found font: LiSong Pro Light
dbg||scan fonts: Devanagari MT
dbg||found font: Devanagari MT Regular
dbg||found font: Devanagari MT Bold
dbg||scan fonts: Gurmukhi MT
dbg||found font: Gurmukhi MT Regular
dbg||scan fonts: Gujarati MT
dbg||found font: Gujarati MT Regular
dbg||found font: Gujarati MT Bold
dbg||scan fonts: InaiMathi
dbg||found font: InaiMathi Regular
dbg||scan fonts: Arial Unicode MS
dbg||found font: Arial Unicode MS Regular
inf||loading font: https://fonts.gstatic.com/ea/notosansjapanese/v6/NotoSansJP-Regular.woff
dbg||loaded resource: https://fonts.gstatic.com/ea/notosansjapanese/v6/NotoSansJP-Regular.woff
dbg||loaded resource: type: yes(resource_type("font/woff", [], unknown, no))
inf||used font: Noto Sans JP Regular, Regular
100


Any ideas what's going wrong?

Thanks!
  1. test.html0.5 kB
mikeday
I think this may be due to a bug in Prince's support for OTF fonts (OpenType fonts with CFF / PostScript outlines).
misc
Is there any fix for this problem? I was planning to use Noto Sans Korean and Japanese versions in a publication, but I'm getting blank characters.

If there is no support for OTF with CFF / PostScript outlines, is there a way to convert these fonts to a supported format?
mikeday
We are closing in on the problem and hope to have a solution available in a month or two, although supporting subsetting for CFF fonts will take longer.
mikeday
Wow we actually delivered this on schedule, nice. :D

The latest build has a fix for CID-keyed CFF fonts, which are what are commonly used in OpenType .otf font files for non-Latin scripts.
cnj125
I am trying the latest build to see if it has fixed the font problem that I am facing. However, I found that it is failed to use XInclude while using "prince-20170522-win32". Is there any update to the XInclude?

Thanks
mikeday
XInclude is now disabled by default for security reasons, and must be enabled with the --xinclude option.
cnj125
I have enabled this option.

My command is

"prince-20170522-win32\bin\prince.exe" --xinclude --javascript index.html

The html content in index.html is printed in PDF, but other xinclude content is missed without any error message. I used the same command in Prince10 before without any problem.
mikeday
Sorry you will also need to specify "-i xml" or the HTML file will be parsed as HTML instead of XML, and XInclude does not apply to HTML files.
cnj125
Great! It is working now. Thanks a lot.