Fonts not enable / install in my CentOS VPS server

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
somanweb

Fonts not enable / install in my CentOS VPS server

Post by somanweb »

Hello ,

I have installed the imagemagick in my local system , it is working fine . I am not able to convert the PDF into Image with all fonts support. My local server is Centos 5 version.

But if i install the imagemagick in my VPS server , when i convert the PDF to Image, only Arial font is support, other font are displaying as a symbol. My VPS server is Centos 4.X version.

When i check the fonts, the below fonts are listing , but the same font was in my PDF document, but other than Arial fonts are not supporting

Code: Select all

[root@vps test]# ls /usr/share/fonts/msttcorefonts/
andalemo.ttf   ariali.ttf     cour.ttf       fonts.cache-1  georgiab.ttf   tahoma.ttf     timesi.ttf     trebucit.ttf   verdanaz.ttf
arial.ttf      ariblk.ttf     courbd.ttf     fonts.dir      georgiai.ttf   times.ttf      trebuc.ttf     verdana.ttf    webdings.ttf
arialbd.ttf    comic.ttf      courbi.ttf     fonts.scale    georgiaz.ttf   timesbd.ttf    trebucbd.ttf   verdanab.ttf
arialbi.ttf    comicbd.ttf    couri.ttf      georgia.ttf    impact.ttf     timesbi.ttf    trebucbi.ttf   verdanai.ttf
[/color]

When i chck the fonts list using the below command , nothing is display

Code: Select all

convert -list type
[/color]

Please find the below images, one is my PDF file screenshot and another one is converted image screenshot
I have used the following command

Code: Select all

convert test.pdf  test.jpg
Image

Image




Please help me in this, how can i solve this,.

Thanks,
Soman
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Fonts not enable / install in my CentOS VPS server

Post by fmw42 »

you will need to use full paths to your font files, not just names

or

run Anthony's script at http://www.imagemagick.org/Usage/script ... k_type_gen

then you will get all your fonts listed with convert -list font and you can use -font fontname
somanweb

Re: Fonts not enable / install in my CentOS VPS server

Post by somanweb »

Hi ,

Thanks for your help. We have run the script before. aftre that only i have posted this message.,

Your answer will be helpful.

Thanks ,
Soman
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Fonts not enable / install in my CentOS VPS server

Post by anthony »

I know of that font set and IM handles it fine. But you need to tell IM about them...

Download the script, and run the following

Code: Select all

    mkdir $HOME/.magick
    ls /usr/share/fonts/msttcorefonts/*.ttf | imagick_type_gen -f - > $HOME/.magick/type.xml
Now IM should know about the fonts by name. Look at that "type.xml" file or the output of

Code: Select all

convert -list font
For example I can see.... ArialNarrowBI is present on my system!

You can also have your system administrators include that 'XML' included into the IM system type.xml
file. Details on how is in the comments of the script.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply