Chinese text GIF file generation
William Park
parkw at better.net
Sun Mar 11 18:47:30 EST 2001
On Sun, Mar 11, 2001 at 10:59:37PM -0000, hungjunglu at yahoo.com wrote:
> William Park <parkw at b...> wrote:
> > Because there is so many variables (ie. font, style, size, ...), I
> > don't think there is package that does what you want. However, you
> > can use LaTeX to produce Postscript format, and then convert it into
> > GIF.
>
> There surely are existing packages. Just visit any of the Chinese
> news portals (e.g: www.sinanet.com) and you'll see what I mean.
They are using blocks of image in
<map> <area...> <area...> ... </map>.
So, what is your question? Do you simply want to duplicate it using
Python? Or, do you want to display each character as separate image?
> Unlike Korean or Japanese, or even Vietnamese, for Chinese websites,
> it is usually a better idea to present text in GIF than in multi-byte
> encoding schemes. The thing is, there is a big need out there for
> real-time or quasi-real-time on-the-fly GIF generation of Chinese
> text in GIF format. Anything that involves an intermediate manual
> process is unacceptable. (Besides, it's easy to do it manually on any
> PC: screen capture + format conversion and you are done. It's just
> time-consuming.) For websites containing multiple foreign languages
> in the USA, text-to-gif converters is a real necessity: you don't
> want to show jibberish to your visitors.
Since you seem to be talking about character-by-character display...
Okey, generation of image for each character can be automated; it's
simple script loop. If you use LaTeX, then see near bottom of
'HTMLtag.py' package --- do the search from <www.python.org>.
Once these images are stored in /icons/chinese/, you would have to write
stand-alone script to match your input characters to corresponding
images. It would spit out <img src=...> for each chinese character.
---William Park, Open Geometry Consulting, Linux/Python, 8 CPUs.
More information about the Python-list
mailing list