[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] bitmap word/dword alignment
From: |
David Turner |
Subject: |
Re: [Devel] bitmap word/dword alignment |
Date: |
Wed, 25 Apr 2001 14:03:42 +0200 |
Hello Mike,
Mike Owens a écrit :
>
> Is it possible to align the bitmaps from the truetype driver on a word/dword
> boundary? If so, where would I attempt to do this in the code.?
> Thanks
>
It's not possible in the general case, because some of the bitmaps can
simply be embedded in the font file, and these will not be word/dword
aligned.
It's possible to render scalable TrueType outlines to word/dword buffers
though. Check that the glyph image is scalable with:something like:
FT_Load_Glyph( face, gindex, FT_LOAD_DEFAULT );
if ( face->glyph->format == ft_glyph_format_outline )
{
// this is a scalable outline..
}
now, you should be able to render the outline by allocating a bitmap
with approprate dimensions and padding then calling
FT_Outline_Render( library, &face->glyph->outline, .. )
with appropriate values.
This is not necessarily trivial, and I do _not_ recommend you to do
that anyway..
Regards,
- David