Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to create kanji TIFFs?



>>>>> "Ulrike" == Ulrike Schmidt <ulrike@example.com> writes:

    Ulrike> I have to create some pictures of kanji in TIFF
    Ulrike> format. Any hints about which tool I might use for that? 
    Ulrike> According to the gimp-FAQ Japanese fonts seem not to be
    Ulrike> supported.

gs -dNOPAUSE -dQUIET -sDEVICE=tiff -sOutputFile=kanji0.tif kanji0.ps -c quit

where kanji0.ps is

%! PS-Adobe-2.0
144 /Ryumin-Light-H findfont exch scalefont setfont
100 100 moveto
(C88E) show showpage

will give you 淡古 (my hanko) in 5 cm tall glyphs.  That's raw 7-bit
JIS with no escape sequences.  If you like hex better, use angle
brackets

<43383845> show showpage

If that doesn't work straight to TIFF, you can output to PNM almost
surely and use the Swiss Army pixmap utility, I mean, netpbm by Jef
Pozkanzer.  You may want to do that anyway because the TIFF produced
will be letter or A4 sized ;-)  The TIFF I got was 500kB.  The PNM was
475kB (this is the "GIF problem", Ghostscript doesn't do LZW because
of the Unisys patent, it produces an LZW header with a dictionary
that maps 1 to 1 and 0 to 0 ;-).

If you need to save space 

gs -dNOPAUSE -dQUIET -sDEVICE=pnm -sOutputFile='| gzip -9 > kanji0.pnm.gz'

produces an enormous 3529 byte file.  Yow!

YMMV w.r.t. fonts and sizes, of course.

HTH

-- 
University of Tsukuba                Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences       Tel/fax: +81 (298) 53-5091
_________________  _________________  _________________  _________________
What are those straight lines for?  "XEmacs rules."

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links