Page 2 of 2

Re: PAID: Looking someone to finish up a bug SVG to PDF (Chinese font problem)

Posted: 2016-08-27T07:13:13-07:00
by Gergelyc
I never read the final svg back illustrator. So I don't know, the whole purpose of this endavour is to leave out illustrator. I can check but I need time to set it up.

But we are getting off of the original problem that if the SVG renders correctly in browser as an image why does the convert decides to disregard the font that is burnt in into the svg?

Re: PAID: Looking someone to finish up a bug SVG to PDF (Chinese font problem)

Posted: 2016-08-27T10:43:44-07:00
by dlemstra
I think that the problem is that your font is defined as a font-face. What you could do is check if the file has an embedded font and extract the font from the file. This font is based64 encoded and should be decoded and saved to disk. Then you will need to add this font (file) to your command line and you should be able to get the correct result.

Re: PAID: Looking someone to finish up a bug SVG to PDF (Chinese font problem)

Posted: 2016-08-28T02:42:01-07:00
by Gergelyc
@Dlemstra

We tried that earlier and even tried changing the inline and external font to different and the PDF reacted. In very very very strange ways. Sometimes changing the font would completly remove the ASNSI characters and create Kanjis out of it, sometimes just screw up the PDF completely.

My developer says that the Convert changes font inside a block. So certain part of the block that is Kanji is rendered in the font that the file specifies but the rest, brackets and numbers are rendered in a different font type.

He said that if the font would be the problem than the whole svg would have this problem not only the numbers. And as such changing the font would not effect it.

Re: PAID: Looking someone to finish up a bug SVG to PDF (Chinese font problem)

Posted: 2016-08-28T03:40:00-07:00
by dlemstra
I still think that the font is the problem. Librsvg (pango) will use a fallback font when it cannot find the font. On my machine it is unable to find the font 'zh' and it uses 'sans' instead. I assume you are working under linux? What happens when you extract the embedded zh.ttf file and install it in the .fonts folder of the user your site is running under?

Re: PAID: Looking someone to finish up a bug SVG to PDF (Chinese font problem)

Posted: 2016-08-28T07:27:46-07:00
by Gergelyc
Hi there,

We managed to find the problem, dlemestra set us on the right path and for record, or if anyone bumps into this in the future.

The font had a kanji name, we renamed it for zh.ttf for easier reading.

Apparently for reasons beyond our understanding the convert program disregarded the font, this way. So the developer dug into the FONT file, found what is the font is called in Kanji and burned in the font with that name.

Since than it works.

Moral of the story, never rename your font file.

Thanks for the help

Re: PAID: Looking someone to finish up a bug SVG to PDF (Chinese font problem)

Posted: 2016-08-28T08:02:05-07:00
by dlemstra
Happy to hear that you got it solved and thanks for coming back to report what caused the issue.