For Programmers: Free Programming Magazines  


Home > Archive > A86 Assembler > May 2006 > reg - How to load font file (ttf, etc) using assembly









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author reg - How to load font file (ttf, etc) using assembly
gv

2006-05-07, 6:59 pm

Hi,
Please help me to load true type font file, using assembly. or anyway
to get and load pixel matrices of a character.

Thanks

by
gv.

Tim Roberts

2006-05-07, 6:59 pm

"gv" <spamtrap@crayne.org> wrote:
>
>Please help me to load true type font file, using assembly. or anyway
>to get and load pixel matrices of a character.


TrueType font files do not contain pixel matrices. Instead, the character
outlines are described using lines and curves. It's almost a mini computer
language.

The easy way to get pixels is to use the Win32 TextOut API into a bitmap.
If you aren't running in Windows, there are a couple of good open souorce
TrueType font renderers available, but they are rather complicated.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Tim Roberts

2006-05-09, 3:56 am

spamtrap@crayne.org wrote:
>
>
>EBDT - Embedded Bitmap Data Table
>
>Three new tables are used to embed bitmaps in TrueType fonts. They are
>the 'EBLC' table for embedded bitmap locators, the 'EBDT' table for
>embedded bitmap data, and the 'EBSC' table for embedded bitmap scaling
>information.


Interesting. I didn't realize that, clearly.

Of the 690 TrueType fonts on my machine, 4 contain EBLC and EBDT tables,
and none contain EBSC.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

spamtrap@crayne.org

2006-05-09, 6:56 pm

On Tue, 09 May 2006 05:45:58 GMT, Tim Roberts <spamtrap@crayne.org>
wrote:

>spamtrap@crayne.org wrote:
>
>Interesting. I didn't realize that, clearly.
>
>Of the 690 TrueType fonts on my machine, 4 contain EBLC and EBDT tables,
>and none contain EBSC.


If you were to dig thru those 4 fonts, you would probably find that
the bitmaps are for very small point sizes (4,5,6,7 Pt or so). The
font descriptions don't work so well for complicated shapes in very
small sizes. The bitmaps provide a way around that.

Font sizes that small aren't much used for video display in any case.
For me, 8 Pt on a 1024x768 screen on a 17" monitor is just about too
small to read - I can read it, but it is a strain.
--
ArarghMail605 at [drop the 'http://www.' from ->] http://www.arargh.com
BCET Basic Compiler Page: http://www.arargh.com/basic/index.html

To reply by email, remove the garbage from the reply address.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com