Page 1 of 1

CJK Fonts in convert.exe

Posted: 2014-06-24T02:36:36-07:00
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

Re: CJK Fonts in convert.exe

Posted: 2014-06-24T03:41:24-07:00
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.

Re: CJK Fonts in convert.exe

Posted: 2014-06-25T00:44:05-07:00
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 :(