Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Chinese characters in Vector Format

214 views
Skip to first unread message

Les

unread,
Feb 2, 2004, 10:50:29 AM2/2/04
to

Hi,

I have Chinese character TT fonts available. But I would like to know if I
can get Chinese characters in a vector format, preferably in ASCII, but
binary with a file definition will do.

In searching the web for information on Chinese fonts I have found
conference papers which refer to reading file(s) which describe the
characters in vector format (move / draw ) and converting to another format
but the papers do not contain hyperlinks or site references. I have been
unable to find any site actually containing these vector files.

Can anyone help please?

Thanks
Les


Alan

unread,
Feb 3, 2004, 11:10:51 AM2/3/04
to
"Les" <l.neilson@ace_programmer_cad.co.uk> wrote in message news:<401f6126$0$16188$fa0f...@lovejoy.zen.co.uk>...

> Hi,
>
> I have Chinese character TT fonts available. But I would like to know if I
> can get Chinese characters in a vector format, preferably in ASCII, but
> binary with a file definition will do.

I don't know what you mean by an ASCII vector format...

If you have and can use Chinese fonts, they're already in a vector
format. If you meant to convert them to some form of clip art, get a
drawing app, like Adobe Illustrator or CorelDraw (probably you'll need
a Chinese version) and then create your Chinese text, then select it
and "Convert to curves". Then you can save that as an eps file.

Les

unread,
Feb 3, 2004, 1:01:02 PM2/3/04
to

"Alan" <7ibe...@sneakemail.com> wrote in message
news:2a7ef8ef.04020...@posting.google.com...


Alan,
Thanks for the reply and sorry for not making myself clear.

As I said I have a TrueType Chinese font (which, as you say, is a vector
font rather than a bitmap format).
I am looking for a way of getting a data file which describes each character
in a vector format
for example :

Unicode 8F62
Move 0.001 0.004
Draw 0.121 0.025
Draw 0.2 0.4
Move 0.7 0.211
Draw ......... / Arc / Spline / .... whatever
to fit within some arbitrary box usually (1.0 by 1.0 units) permitting easy
scaling.

The actual format is not important - human readable I can process myself,
binary I would need a file description.

According to a document I have TT "glyph" data has an integer coordinate
range -16384 to +16383 which would allow me to "scale" the character
according to my needs.
I wondered if there was a way to "dump" the vector data out of the TT font
but haven't found one yet. I might have to look at writing one myself if I
can understand the TT format.

However I will look at the methods you suggest too.

Thanks
Les


Zundark

unread,
Feb 3, 2004, 5:23:57 PM2/3/04
to
Les wrote:

> I wondered if there was a way to "dump" the vector data out of the TT font
> but haven't found one yet.

Microsoft's TTFdump utility can do this. However, the form of the
output is very awkward, so this may not be too useful. If you want it
anyway, it's here: http://www.microsoft.com/typography/tools/tools.htm

> I might have to look at writing one myself if I can understand the TT format.

http://www.microsoft.com/typography/tt/tt.htm has documents which
explain the format. But it's surely easier to use the FreeType 2
library ( http://www.freetype.org ) - once you've loaded a glyph, you
can just read the outline data from an FT_Outline struct, I think.

By the way, I've heard that some Chinese TrueType fonts (kaiu.ttf,
mingliu.ttf, etc.) rely on hinting to reshape the outlines - the
unhinted outlines are not even approximately correct. If your font is
one of these, you may have to resort to rendering the glyph and then
vectorizing it, as Alan suggested. Peter Selinger's potrace program
( http://potrace.sourceforge.net ) does good vectorization, so you don't
need a commercial application for this.

Alan

unread,
Feb 4, 2004, 12:42:32 AM2/4/04
to
"Les" <l.neilson@ace_programmer_cad.co.uk> wrote in message news:<401fdffb$0$221$fa0f...@lovejoy.zen.co.uk>...

> "Alan" <7ibe...@sneakemail.com> wrote in message
> news:2a7ef8ef.04020...@posting.google.com...
> > "Les" <l.neilson@ace_programmer_cad.co.uk> wrote in message
> news:<401f6126$0$16188$fa0f...@lovejoy.zen.co.uk>...
> > > Hi,
> > >
> > > I have Chinese character TT fonts available. But I would like to know if
> I
> > > can get Chinese characters in a vector format, preferably in ASCII, but
> > > binary with a file definition will do.
> >
> > I don't know what you mean by an ASCII vector format...
> >
> > If you have and can use Chinese fonts, they're already in a vector
> > format. If you meant to convert them to some form of clip art, get a
> > drawing app, like Adobe Illustrator or CorelDraw (probably you'll need
> > a Chinese version) and then create your Chinese text, then select it
> > and "Convert to curves". Then you can save that as an eps file.

...

> I am looking for a way of getting a data file which describes each character
> in a vector format
> for example :
>
> Unicode 8F62
> Move 0.001 0.004
> Draw 0.121 0.025
> Draw 0.2 0.4
> Move 0.7 0.211
> Draw ......... / Arc / Spline / .... whatever
> to fit within some arbitrary box usually (1.0 by 1.0 units) permitting easy
> scaling.
>
> The actual format is not important - human readable I can process myself,
> binary I would need a file description.

If you do as I wrote above, the EPS file you get is basically like
this.
There are different varieties, if you want to parse it maybe save as
AI EPS in the oldest format, this will be simpler. (EPS files
generally have a huge header with lots of definitions, whether they're
needed or not in a particualr file. Also make sure to omit the
preview, which is a bitmap appended to the code.) Then learn
PostScript. Unless for some reason you actually want to decompile the
native TrueType instructions?

Les

unread,
Feb 4, 2004, 7:53:09 AM2/4/04
to

Thanks Zundark and Alan for the helpful info.
I should be able to make something from all this. :-)

Les


"Zundark" <zund...@alberteinstein.co.uk> wrote in message
news:125b23d1.04020...@posting.google.com...

0 new messages