deeplook / svglib

Read SVG files and convert them to other formats.
GNU Lesser General Public License v3.0
315 stars 80 forks source link

The problem with converting the characters of the Russian alphabet from SVG to PDF #244

Closed Dal-Opez closed 4 years ago

Dal-Opez commented 4 years ago

Hello. Sorry for my english. When converting from SVG to PDF, the symbols of the Russian alphabet in the PDF file are replaced by black squares. Tell me, please, how to solve this problem?

claudep commented 4 years ago

Most probably svglib was not able to find the font file. You may have received some warnings in the command output.

Dal-Opez commented 4 years ago

there were no warnings

claudep commented 4 years ago

Maybe you could point us to that svg file?

Dal-Opez commented 4 years ago

I provide a file in PNG format. After downloading, change the format to SVG. RU_F1_v_6

claudep commented 4 years ago

Thanks for that example. The problem is that the font is defined in your SVG with the <font>/<glyph> tags, which is not supported by svglib. As it seems to be deprecated (see https://developer.mozilla.org/en-US/docs/Web/SVG/Element/font), we won't work on that support. You should update the svg to reference a real font instead.

dantetemplar commented 1 month ago

I have bumped into the very same issue. Is there any code example that works?