image magick couldn't load font error windows - windows-10

I can't seem to use almost any of my system fonts without getting a:
couldn't load font error
on my windows 10. I have IM installed with cairo/pango and am trying to use convert.
I've found that Arial and Verdana work, but obscure fonts do not.
I have a type.xml that includes the type-windows.xml but adding
-font Comic-Sans-MS-Bold
still results in error.
I've used the various font listing commands like
identify -list font
convert -list font
and the output has many many fonts.

Related

bangla font is not working in pdf-lib custom font

I have a problem with the Bangla font.
I've got a problem when I embed Bangla font in PDF-LIB. If any fonts are supported then the output didn't show correctly. It shows like a small rectangle.
Here is the image
And most of time the program is not runned. And terminal say like:
regeneratorRuntime is not defined

Eps to svg, special character not converted

I'm trying to convert an eps (created with Mathtype) to svg format.
I don't have any problems with math characteres, but I'm unable to get any special characters (aka àâä...)
I have tried on unix and windows, and none of those works.
The font used is Arial, and is installed properly(Default on Windows, manually added in fonts folder in unix)
I have oppened the Arial font in windows font manager and the non working character are in.
They just aren't converted.
Actually, to convert I use Inkscape (with ghostscript) like this :
inkscape -z -f in.eps -l out.svg
Thanks in advance,
Edit :
Added in.eps file
https://pastebin.com/vBtUVy69
The fact that you have installed Arial on your Windows box has little to do with the problem.
Does the EPS file include the embedded Arial font ? If not then you are dependent on font substitution. You should probably post a sample EPS file so that we can look at it.
My guess is that the Arial font is not embedded, so Ghostscript substittues Helvetica, and the Helvetica font doesn't have those glyphs, or they are not encoded at the character codes which the EPS file thinks they are.
[EDIT]
The EPS comments say DocumentNeededFonts: Arial-BoldMT", so the EPS does not include the font and you get font substitution.
I can't tell you immediately why the SVG says Arial. I can guess, but in the absence of a complete description as to how you are producing the SVG I can't (obviously) be sure.
Now... if the conversion path uses Ghostscript's pdfwrite device to create a PDF file from the EPS, and that PDF file is then somehow converted to Inkscape's internal format (or directly to SVG using something other than Ghostscript) then what is happening is that Ghostscript is substituting Helvetica for the missing Arial-BoldMT and when it produces the PDF file it embeds the Helvetica font, but calls it Arial-BoldMT (or whatever). That's a consequence of the font substitution, the font that gets substituted gets renamed to the expected name.
I think you can avoid that by setting -dEmbedAllFonts to false, though I haven't tested it. Even if you do, all that happens is that the PDF file then doesn't have the font, just the same as the EPS file. So the SVG creation will (presumably) have to use a substitute font instead. All you do is shove the problem further down.
The correct answer to this is 'always embed fonts'.
You can also make the Arial-BoldMT font available to Ghostscript by editing its fontmap.GS file in ghostpdl/Resource/Init for builds where the resources are not built into a ROM file system. For builds which do use a ROM file system (eg Windows) you must pick up a copy of the Resources (from the Ghostscript Git repository), modify the fontmap.GS file and then tell Ghostscript to use the modified resources by pointing to it with the -I switch.
This is still a hack, because its a TrueType font being used as a replacement for a PostScript font, so there's a certain amount of guesswork going on inside Ghostscript, but it usually works well enough, YMMV.

gnuplot gif not scalable with ttf font

After installing libgd on RedHat Linux, I found the path to .ttf fonts and used the full pathname to a DejaVu .ttf font (in 'set terminal gif font...") to create a .gif file from gnuplot. It looks good in a Firefox window, but when I change the size, it looks bad, as though the font is not scalable.
I am using the default binaries. Do I need to recompile gnuplot with different settings to make it scalable? I get no errors or msgs when the image is created from gnuplot (i.e. it finds and uses the .ttf file; I know because I tried several fonts and the image responded accordingly, with .pfa fonts also).
The gnuplot documentation says that TrueType fonts are fully scalable. Maybe I don't understand what scalable means. I had a similar problem with SUN OS, and my solution was to create a postscript (.eps) file from gnuplot and then convert it to .gif, and then it was scalable, but I don't have such a conversion utility on Linux (yet), and it seems like an unnecessary step.
I don't have the actual code/output in front of me, but I can add some if it would help. Also, I can't find any arial.ttf fonts on the system. Maybe that is a clue to the problem.
I heard good things about pngcairo (to avoid using gd), but 'set terminal' does not list it as an image type.
This is not a definitive answer, but it allows to show me a picture of the situation on my machine.
This plot was generated as gif using gnuplot 4.6p5 and Suse Linux 13.2.
The upper plot shows labels written in DejaVu, left using the full path to the TTF file, right using the name of the font. (DejaVu is an installed font here.)
The lower plot shows the same, the font is from the game Minecraft (i.e. very pixelated). I do not get any error message about missing fonts or similar, but gnuplot uses its default font here, but not what I want. More interesting: When I do not specify the font, I get Liberation Serif...
However, it seems my system ONLY uses fonts, regardless if referenced by name or path, when the font is correctly installed. Nevertheless, also the default font is smooth and scalable. (the gnuplot help says, gd has some not scalable build-in fonts, which may be used in your plot)

IMagemagick's DrawAnnotation doesn't appear to work on Amazon's Linux

I am using Python's wand 0.2.2 to access ImageMagick 6.5.4-7. I am trying to apply some text to some photos. I had to extend wand 0.2.2 a bit, but I got it working on Windows. My python code is as follows:
color = image.Pixel()
color.color = 'white'
draw = image.Draw()
draw.font = 'verdana'
draw.fontsize = font_size
draw.fillcolor = color
draw.annotation(dx, dy, watermark_text)
new_image = image.Image(width=pic.width, height=pic.height)
new_image.DrawImage(draw)
On my Amazon linux instance, I installed the msttcorefonts. If I do
identify -list font
I get a list of fonts that includes verdana. If I run:
convert -font verdana label:foo foo.gif
I get an image that has verdana text.
Everything looks good, until I execute my code and I get no text on my picture.
The python code works fine on Windows, and as far as I can tell imagemagick can find the font on my linux box. It just refuses to place the text on the picture.
I've tried "verdana," "Verdana-Regular", and the full path to the ttf '/usr.../verdana.ttf'. I even tried other fonts that are installed on the system. The draw code is working, if I add "draw.circle..." then a circle will be drawn on my image.
What am I missing?

pdftops eps font issue

I'm creating a pdf with Apache FOP in Linux
then I need to convert the pdf it into an eps.
I'm trying lot of ways, the only one that seems works is the pdftops.
But,
when I convert it into Linux in command line
pdftops file.pdf -eps file.eps
This command creates me the eps
but when I try to open it in Adobe Illustrator in Windows XP
It returns me the error
EAAFD+HelveticaNeueLTStd-MdCnO_99-Identify-H;
Font not found on the system; missing font has been substituted.
But
1: the fonts han not been substituted
2: the eps do not show words inside it is all blank instead of the images
I'm sure that in Windows XP I have all the fonts
becouse if I convert the pdf to an eps inside the Adobe Illustrator
all works fine and Adobe Illustrator do not show me the fonts issue.
Can you help me?
What I'm doing wrong?
If something is not working as intended, then that's a bug clear and simple: it needs to be debugged and fixed. Please could you file a bug-report at:
launchpad.net/ubuntu/+source/poppler/+filebug
along with a copy of the PDF file that is being generated, and the exact command that is being used for the conversion (particularly whether it is pdf2ps (part of GhostScript), or pdfteps (part of Poppler/Xpdf and found in the poppler-utils package).
(Note that this question has been asked in three other places, but not yet reported in the bug-tracker where it can be explored, pointed to the right people and hopefully fixed).
Without knowing much about your setup, it looks like you're asking FOP to draw your text using the Helvetica Neue font, which is not part of the standard set of PDF fonts (note that Helvetica is, but not Helvetica Neue).
It would seem to me that your two options are to either force FOP to use Helvetica instead of Helvetica Neue, or force it to embed Helvetica Neue into the PDF (pdf2ps should automatically embed it into the result EPS file). In the first instance, you shouldn't need embedding at all, while in the second case the file should be embedded.
More info on how FOP handles fonts is also available from the package's documentation—as you can see, Helvetica Neue is not listed here.

Resources