![]() Process = subprocess.Popen(bashCommand.split(), stdout=subprocess.PIPE) This is the command I run (from a Python script) to do the conversion: bashCommand = "inkscape " + file + " -D -without-gui -export-eps=exports/" + type + ".eps" I'm trying to convert a SVG image to a EPS file using the Inkscape command line.Recently I had the job to convert EPS files to SVG graphics. The file is generated and when it opens most of it seems to be as expected. The problem is that some of the text won't show up (see screenshot below). Instead there are weird rectangular symbols. Most of the missing text doesn't have special characters. This is the output I get when using the locale command: LANG=en_US.UTF-8 Then I reconfigured the locales using sudo dpkg-reconfigure locales In /etc/default/locale I've tried to add the following (I came across this possible fix while I was looking for a solution): LANG="en_US.UTF-8" This is the error I see when printing the error variable: (process:1855): Gtk-WARNING **: Locale not supported by C library.įontconfig warning: ignoring UTF-8: not a valid region tag I really have no clue what can cause this problem. I'm using Open Sans as font and installed the font on the server as well. After adding the fonts to /usr/local/share/fonts I rebuild the font cache with the fc-cache -f -v command. When converting the SVG to a PDF with the code below, everything works as expected. ![]() bashCommand = "inkscape " + file + " -D -d 300 -without-gui -export-pdf=exports/" + type + ".pdf" All text is visible and the Open Sans font is used. I got Inkscape 0.91 installed.ĭoes anyone know how to get the text right? And why is the text converted to these symbols (first screenshot)? Hope someone can help! I've been searching the internet for a while to find a solution, but I couldn't find one so far. I can only tell you part of what's going on. The 'weird rectangular characters' are TrueType. When you use a font, it does not contain every possible glyph in every written language known to man. ![]() In addition, in PostScript regular fotns (as opposed to CIDFonts) can only access 255 different glyphs at a time. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |