Forum Bugs

Google font and Euro symbol

fdelaneau
Hi,

I have an invoice template that uses a custom font (Josefin Slab) loaded from Google fonts.

On the browser everything looks fine and the Euro currency symbol does match the font but when I create a PDF it reverts to the default serif system font.

I don’t understand why especially since the font is correctly loaded since the text is fine.
  1. Browser.png11.2 kB
  2. PDF.png10.2 kB
mikeday
Unfortunately Google Fonts chooses to serve different fonts to different user agents, and it is giving Prince an older version of the font that does not include the Euro symbol.

The newer font that gets served to browsers appears to be using the WOFF2 format, which Prince doesn't support yet, while the older version on FontSquirrel is TTF but does not include the Euro symbol.

Perhaps you could download the newer font from here and convert it to TTF to use with Prince?
fdelaneau
This is sadly not an option, our goal is to allow our users to select their font from google font library.

Thanks for the quick reply anyway. I hope you’ll add support to WOFF2 format soon.
mikeday
Yes, it is definitely on our roadmap!
jamespaden
Any update to your plans for WOFF2 support? Thanks!

Try DocRaptor - PrinceXML web service and official PrinceXML partner

mikeday
Maybe! We will check.
mikeday
Prince latest builds now include support for WOFF2 fonts! :D