Fontnames Ubuntu vs Windows

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Marcel71
Posts: 49
Joined: 2011-04-13T13:57:34-07:00
Authentication code: 8675308

Fontnames Ubuntu vs Windows

Post by Marcel71 »

Hi,

My current server which has IM is on Windows. I am busy making a fall-back server which is running on Ubuntu.
However, when i want to make a text, the text does not show with the ubuntu server. This is because the font is not known to the system. Although i installed the same ttf fonts in Ubuntu.

However, when i do an identify on both systems i get the following:

Code: Select all

identify -list font
With Ubuntu one of the fonts says:
Font: Yahoo-Regular

When i do the same in windows:
Font: Yahoo

It means Ubuntu just adds the -Regular behind the font name.
I think Imagemagick somehow identifies the font on ubuntu with the extra "-Regular"

Can i somewhere tell IM that it isn't "Yahoo-Regular" but just "Yahoo"?
Marcel71
Posts: 49
Joined: 2011-04-13T13:57:34-07:00
Authentication code: 8675308

Re: Fontnames Ubuntu vs Windows

Post by Marcel71 »

Okay, found out myself.

I have to make a custom type-myfonts.xml
See: http://www.ict.griffith.edu.au/anthony/ ... k_type_gen
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Fontnames Ubuntu vs Windows

Post by anthony »

Actually that is
http://www.imagemagick.org/Usage/script ... k_type_gen
the script includes a large comment detailing what it does and various whys of using it.

I tried to make it 'junk' the more useless parts of font names like "-Regular", and compress other parts like "Bold" to just "B", but you are welcome to download and 'tinker' with your own copy. the scripting is fairly straightforward, and well commented. Actually I hate programmers who do not comment there code properly!

I myself create two separate font files. a type-system.xml (system wide but not in my home) and a type-personal.xml (my home font directory). This lets me distribute my home to other machines (with different system fonts) more easily.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply