CJK Fonts in convert.exe

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
Tanke_MD
Posts: 2
Joined: 2014-06-24T02:31:29-07:00
Authentication code: 6789

CJK Fonts in convert.exe

Post by Tanke_MD »

Hi guys,

Im new in this forum, but I was using ImageMagick some time and I love it.

I have some problem converting pdf, pcl or postscript files to image keeping CJK fonts, I have installed this kind of fonts in Windows, using "identify -list font" I get a list of fonts and there are fonts like SimSun, SimHei, etc... but later when I try to generate a image from pdf, pcl or postscript I lose this characters (I keep "Roman" characters), and all "english" text appears, but texts in CJK no.

The command I use is "convert.exe -density 150 <pdf/pcl/ps_path> <image_path>". It is necessary any further configuration?

Thanks a lot :D
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: CJK Fonts in convert.exe

Post by snibgo »

I don't use extra font with postscript, so I am guessing. Your IM installation directory contains type.xml, which links to type-ghostscript.xml, which contains a list of fonts for ghostscript. You might need to add your CJK fonts to this file. For more portability, add them to another file and link to that from type.xml. Better yet, create a new type.xml in your home directory and IM will pick it up. Running IM with "-debug all" will tell you where it looks.

To see if this works, I would just add the CJK to type-ghostscript.xml. If that cures the problem, then figure out how to do it properly.
snibgo's IM pages: im.snibgo.com
Tanke_MD
Posts: 2
Joined: 2014-06-24T02:31:29-07:00
Authentication code: 6789

Re: CJK Fonts in convert.exe

Post by Tanke_MD »

Hi,

I didnt found the way to do it, this is, in type-ghostscript.xml for example we have these tags:

<type name="Times-Roman" fullname="Times Regular" family="Times" foundry="URW" weight="400" style="normal" stretch="normal" format="type1" metrics="@ghostscript_font_path@n021003l.afm" glyphs="@ghostscript_font_path@n021003l.pfb"/>

It seems that is to be use with afm and pfb files, in my case I want to use TTF or OTF fonts installed in my system, for that, I saw some examples in Internet creating a type-windows.xml file, I create it adding these tags:

<type name="SimHei" fullname="SimHei" family="SimHei" weight="400" style="normal" stretch="normal" glyphs="simhei.ttf"/>

for example to add SimHei font (with Chinese Simplified).

Later I put this type-windows.xml in type.xml, but the result its the same :(
Post Reply