TrueType fonts and IM

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
rperez

TrueType fonts and IM

Post by rperez »

Hi there,
we want to use true type fonts in our application.
we are working on linux AS3 and we would like to indicate to the app, a folder in which the ttf files exist and the IM library will use the fonts in that library.
is there an easy way to do it or must I specifically add each font in the config file that holds the fonts locations and names?

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

Post by anthony »

You need to list each font explictally in the type.xml file.
I myself use linux, and have a program to locate and list all the fonts
(truetype and postscript) on my system in my personal file. This is a script, whcih I occasionally tweek to handle odd or badly named fonts.

I publish it on the IM Examples web (top level page), and for true type fonts is now a self contained perl script, thanks to a contribution by a fellow user. As such you should be able to modify it for use on window systems.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
rperez

Post by rperez »

thanks, it helped a lot,

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

Post by anthony »

The Script basically just finds and adds the fonts it does not do much else.

If you like to modify and contribute changes, please do.

I generally use TrueType fonts rather than OpenType or Postscript Fonts, so I have not done much work on the script in those areas.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

Sorry for the long delay in answering. I have been on a month long tour of Europe with my wife. Very busy time.

I myself have the Jokerman font and the current "imagick_type_gen", link from the top level page of IM examples, and it finds and sets up a type.xml entry fine.
<type
format="ttf"
name="Jokerman"
fullname="Jokerman"
family="Jokerman"
glyphs="/home/anthony/lib/fonts/truetype/fun/Jokerman.ttf"
/>

Actually the entries are simple enough you could create them yourself. most of the junk in the script it to type to automatically work out the names for the font.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

The updateDB will not show files belonging to another user. I am not sure if it will do so if the files are publically read/accessable.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply