[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FT2: FT_Get_Glyph_Bitmap()
From: |
David Turner |
Subject: |
Re: FT2: FT_Get_Glyph_Bitmap() |
Date: |
Mon, 21 Feb 2000 16:50:39 +0100 |
Hi Jack,
>
> Hi David/Werner,
>
> The FreeType 2.0 Tutorial (freetype2/tutorial.html) makes reference to a
> FT_Get_Glyph_Bitmap() function for bitmap rendering. While this function is
> defined in freetype.h, there does not appear to be any implementation in the
> FT2 sources as yet (at least as of 2/17). ftview.c shows using
> FT_Load_Glyph(), FT_Translate_Outline() and FT_Get_Bitmap_Outline().
>
> I assume that using FT_Load_Glyph(), FT_Translate_Outline() and
> FT_Get_Bitmap_Outline() will still be a valid way to perform rendering. Am I
> correct to assume that FT_Get_Glyph_Bitmap() will simply be an embodiment of
> FT_Load_Glyph(), FT_Translate_Outline() and FT_Get_Bitmap_Outline()?
Well, the planned API is :
FT_Get_Glyph_Bitmap( face, &bitmap )
Render the glyph image currently loaded in the face's glyph slot
in a target bitmap. Pretty much dispatch the call to the glyph format's
raster (does not translate the outline or create the pixels buffer).
FT_Load_Glyph_Bitmap( face, glyph_index, load_flags )
Load a given glyph, create a bitmap buffer for it then
render the glyph within it. The image can then be accessed
through "face->glyph->bitmap".
FT_LOAD_MONOCHROME is used to specify a b&w bitmap only
otherwise, the number of grays is given through a function like
FT_Set_Raster_Mode( format, "grays", 128 );
For now, I haven't made my mind yet..
- David