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

Do you need consulting from ImageMagick experts and are willing to pay for their expertise? Or are you well versed in ImageMagick and offer paid consulting? If so, post here otherwise post elsewhere for free assistance.
Gergelyc
Posts: 10
Joined: 2016-08-26T09:47:17-07:00
Authentication code: 1151

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

Post by Gergelyc » 2016-08-27T07:13:13-07:00

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?

User avatar
dlemstra
Posts: 1383
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

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

Post by dlemstra » 2016-08-27T10:43:44-07:00

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.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

Gergelyc
Posts: 10
Joined: 2016-08-26T09:47:17-07:00
Authentication code: 1151

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

Post by Gergelyc » 2016-08-28T02:42:01-07:00

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

User avatar
dlemstra
Posts: 1383
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

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

Post by dlemstra » 2016-08-28T03:40:00-07:00

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?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

Gergelyc
Posts: 10
Joined: 2016-08-26T09:47:17-07:00
Authentication code: 1151

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

Post by Gergelyc » 2016-08-28T07:27:46-07:00

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

User avatar
dlemstra
Posts: 1383
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

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

Post by dlemstra » 2016-08-28T08:02:05-07:00

Happy to hear that you got it solved and thanks for coming back to report what caused the issue.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

Post Reply