Hi,
I am using IM-6.8.3-10 on Solaris. I tried to convert a text to png file by using the following command.
$ convert label:"HELLO" 1.png
1.png file gets created but without the text "HELLO"
While trying to debug the issue, I found that IM-6.8.3 is using system fonts instead of the fonts specified in type-ghostscript.xml file.
Snippet from debug log:
-----------------
2013-03-20T13:17:45+00:00 0:00.020 0.020u 6.8.3 Configure convert[2094]: type.c/LoadTypeList/975/Configure
Loading type configure file "/usr/lib/ImageMagick-6.8.3/config-Q16/type.xml" ...
2013-03-20T13:17:45+00:00 0:00.020 0.020u 6.8.3 Configure convert[2094]: type.c/LoadTypeList/975/Configure
Loading type configure file "/usr/lib/ImageMagick-6.8.3/config-Q16/type-ghostscript.xml" ...
2013-03-20T13:17:45+00:00 0:00.350 0.300u 6.8.3 Annotate convert[2094]: annotate.c/RenderFreetype/1219/Annotate
Font /usr/X11/lib/X11/fonts/75dpi/helvR12-ISO8859-1.pcf; font-encoding none; text-encoding none; pointsize 12
----------------
If a particular font is present as system font then IM doesn't care about whatever is mentioned in the type-ghostscript.xml file.
Is there a way to prioritize the fonts path that should be used ? I complied the code using configure option '--with-fontpath=/usr/share/ghostscript/fonts', but that didn't make any difference.
Thanks,
Sonam
convert text to png not working with IM-6.8.3-10
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: convert text to png not working with IM-6.8.3-10
I think you need to specify a width or height or pointsize. But perhaps there is a bug in your version of IM. Perhaps upgrade. There were some recent bug fixes to label: see the changelog http://www.imagemagick.org/script/changelog.php
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: convert text to png not working with IM-6.8.3-10
if no width/height/pointsize is specified it should default to 12 point.
As for ordering the font paths, that is simply ordering the fonts specified in the XML files.
the start point is the system fonts, followed by the system installed "type.xml" file.
This file is typically just a list of 'include' other type-* files.
the order of the includes will specify the order of ttf vs ghostscript fonts.
After that file other "type.xml" files are looked for, such as in 'home' directories, or even current directory.
Later fonts will NOT replace earlier fonts, as such if two fonts have that same name, only the first one
will be noted by IM. (a security measure).
To see the fonts loaded use
It lists "Path:" of the type file each font list was found in, but the paths are listed in REVERSE order, with system fonts at the end.
I have however a personal Font named "Courier", but it is not listed in the above list as it was defined after the "Courier" that was found in the "System Fonts" area, (which is grouped at the end of the above list).
On the other hand my own personal font CourierNew, is listed, as it does not clash with any system or system config defined font.
To see what font glyph file is selected for soem specific request use...
As for ordering the font paths, that is simply ordering the fonts specified in the XML files.
the start point is the system fonts, followed by the system installed "type.xml" file.
This file is typically just a list of 'include' other type-* files.
the order of the includes will specify the order of ttf vs ghostscript fonts.
After that file other "type.xml" files are looked for, such as in 'home' directories, or even current directory.
Later fonts will NOT replace earlier fonts, as such if two fonts have that same name, only the first one
will be noted by IM. (a security measure).
To see the fonts loaded use
Code: Select all
convert -list font
I have however a personal Font named "Courier", but it is not listed in the above list as it was defined after the "Courier" that was found in the "System Fonts" area, (which is grouped at the end of the above list).
On the other hand my own personal font CourierNew, is listed, as it does not clash with any system or system config defined font.
To see what font glyph file is selected for soem specific request use...
Code: Select all
convert -debug annotate xc: -font Courier -annotate 0 'Test' null:
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/