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

True Type Font to C array

5,140 views
Skip to first unread message

Arjan

unread,
Jul 4, 2001, 4:53:55 AM7/4/01
to
Hi,
Does anybody know where I can find a utility that can convert a
Windows True Type Font to a C-style array of bitmap data? I need it to
put some nice characters on an OSD for an embedded application. It
doesn't have to be freeware.
Thanks,
Arjan

Doug McIntyre

unread,
Jul 4, 2001, 11:56:54 AM7/4/01
to

How about FreeType? http://www.freetype.org/

Its a TrueType font renderer library.
--
Doug McIntyre mer...@visi.com
Network Engineer/Jack of All Trades
Vector Internet Services, Inc.

David Williams

unread,
Jul 4, 2001, 6:26:53 PM7/4/01
to
Have a look at my web site there is two links to tools that can do it (look
for BBUGEZ32, and Ramtex Internationals Icon Editor.)

http://members.ozemail.com.au/~davidwilliams/ddl_home.htm#fonts

Dave.

MS

unread,
Jul 5, 2001, 2:29:09 AM7/5/01
to
You can ask to SwellSoftware for their program "pfontcap.exe"; it converts
any Windows font.


Arjan <aos...@cistron.nl> wrote in message
3b42d992...@news.cistron.nl...

Arjan

unread,
Jul 5, 2001, 5:01:40 AM7/5/01
to
On Wed, 04 Jul 2001 15:56:54 GMT, mer...@visi.com (Doug McIntyre)
wrote:

Thanks, but it's a little too much for my purposes. The application
will contain only 1 font, in 2 different sizes. I merely want a
utility to easily generate font bitmap arrays to see which font looks
best on OSD.

Arjan

Arjan

unread,
Jul 5, 2001, 5:08:10 AM7/5/01
to

Thanks for the links David!
BBUGEZ32 works fine, but unfortunately it creates only the first 128
characters, and I need all 256.
The Ramtex tool does create all 256, but all characters are of a fixed
width (so the 'i' uses as much memory as the 'W'). Or am I wrong about
this (the UI wasn't too clear)?

Arjan

Arjan

unread,
Jul 5, 2001, 5:11:49 AM7/5/01
to
On Thu, 5 Jul 2001 08:29:09 +0200, "MS" <msa...@generalmusic.com>
wrote:

Thanks, I'll try.

Arjan

Lewin A.R.W. Edwards

unread,
Jul 5, 2001, 9:02:38 AM7/5/01
to

>> Does anybody know where I can find a utility that can convert a
>> Windows True Type Font to a C-style array of bitmap data? I need it to
>> put some nice characters on an OSD for an embedded application. It

FWIW my solution to this exact problem is:

1. Ask graphic design guy to type out the characters from 32-127 in
the desired font, in Photoshop, and count the width of each. Then save
the file as a 24-bit .BMP and give it to me along with the spacing
table data.

2. Write my own little proglet to import the BMP, pack it to 1bpp and
convert to a header file.

Figure a couple of hours to get the software all working, another
couple for someone else <g> to do the pixel-counting. Much easier if
you're using a fixed-width font, of course.

-- Lewin A.R.W. Edwards
Work: http://www.digi-frame.com/
Personal: http://www.larwe.com/ http://www.zws.com/

"'Tis the distinctive characteristic of candor and
goodness; decent people never suspect the evil
whereof they themselves are incapable, and this
explains why they are so easily duped by the first
rogue who chances along to take advantage of them,
and why 'tis so easy, and so inglorious, to deceive
them. The insolent rogue who attempts it is working
only to debase himself and, without even proving
his talent for vice, merely manages to make virtue
seem all the more brilliant."

Jim Stockton

unread,
Jul 5, 2001, 9:51:32 AM7/5/01
to
Thanks David
I was looking for the same stuff to use on an 8051 with SED1330 and a
320 by 240 monochrome display. I'll give it a try.
Jim Stockton

Gene S. Berkowitz

unread,
Jul 5, 2001, 10:44:38 PM7/5/01
to
In article <3b42d992...@news.cistron.nl>, aos...@cistron.nl says...
I recommend FontBuilder, from Metagraphics.
It is mainly a TrueType to Bitmap renderer. You can specify
the dot pitch to render to for your LCD. The bitmaps generated
are in Metagraphics font format, which is pretty versatile and
royalty-free.
They have just announced FontBuilder/Unicode, which, as the name
implies, is not limited to 128/256 ASCII characters.
I was involved in beta-testing FB/U, and it was extremely helpful.
(Our project required Katakana, Hirigana, and Cyrillic, as well as
the entire Latin and Latin Extended characters).

www.metagraphics.com

--Gene

Rich Webb

unread,
Jul 6, 2001, 9:54:36 PM7/6/01
to
On Thu, 05 Jul 2001 09:01:40 GMT, aos...@cistron.nl (Arjan) wrote:

>Thanks, but it's a little too much for my purposes. The application
>will contain only 1 font, in 2 different sizes. I merely want a
>utility to easily generate font bitmap arrays to see which font looks
>best on OSD.

Be very cautious about licensing restrictions. The font that you create
would almost certainly be considered a derivative work and would require
the permission (at the very least) or an additional royalty fee from the
copyright holder.

Be a bummer to get your product finished and in distribution and then to
get a call from somebody's lawyers...

There are some genuine freeware fonts out there but most of the well
designed typefaces belong to companies that are not at all shy about
litigation.

--
Rich Webb Norfolk, VA

Rich Webb

unread,
Jul 9, 2001, 9:47:05 PM7/9/01
to
On Mon, 09 Jul 2001 23:59:05 +0100, z...@ds1.com (Peter) wrote:

>I thought that the way Corel produced the thousands of fonts that come
>with Corel Draw was by printing out the other peoples' fonts, scanning
>them in, then vectorising the bitmaps. That way the outline isn't
>identical but it looks very similar. Then you call it Ottawa instead
>of the original name Optima :) Same goes for Bitstream. This all goes
>back to the 1980s. The drawback is that you lose hinting information
>(varying the outline according to font size).

Most of the Corel fonts (at least nowadays -- my early version CDs are
way buried) are licensed from Bitstream, the rest from various digital
type foundaries: Letraset, URW, etc. There is indeed some re-digitizing
going on: e.g., Bitstream's "Zapf Humanist" face, a form-fit-and-
function standin for Optima, is supposed to have been digitized for
Bitstream by Hermann Zapf -- the creator of Optima. Usenet legend has it
that Herr Zapf preferred the Bitstream rendering to the original from
Linotype.

A great deal of the value of a quality digital typeface is in the
hinting and kerning tables. Even if a clean rendering of a scanned image
yields nice individual characters, the aggregate will look butt-ugly.

Bitstream (and some others, but Bitstream is the best known) may have
gotten a little out of hand in the wild and wooly early days of digital
typography. The good ones (Bitstream included, although some designers
may still harbor a grudge) got righteous (or at least got better legal
advice) and entered into licensing agreements with the typeface owners.
The bad ones continued on with "5 bazillion fonts for $5" CDs and got
litigated out of existence.

Ralf Krizsan

unread,
Jul 10, 2001, 2:25:36 AM7/10/01
to
Hi Arjan.

Although I saw you already got a tool to work with (did you solve the
Ramtex tool 'i'/'W' problem?), here's another proposal that solved my
text/grafic problem with a b/w graphical lcd display. I worked it out
with
- StarOffice and
- KDE tool 'KHexEdit'

1. You need a Bitmap (with all characters or your grafic) to be
converted.
Should be done with any graphical tool to insert ttf text into a bitmap.
2. StarOffice can open the bitmap and save it under the standard pbm -
portable bitmap fileformat as 'binary'
(see http://www.dcs.ed.ac.uk/home/mxr/gfx/) that already handles the
1Bit/pixel without overhead.
3. Open this *.pbm with KhexEdit an export it as 'C-Array', with options
to give the number of columns/line.
The result is a C-style file.

Ralf


>>>>>>>>>>>>>>>>>> Ursprüngliche Nachricht <<<<<<<<<<<<<<<<<<

Am 04.07.01, 10:53:55, schrieb aos...@cistron.nl (Arjan) zum Thema True
Type Font to C array:

0 new messages