forked from minhngoc25a/freetype2
* src/winfonts/winfnt.c (FNT_Load_Glyph): Revert change from
2003-03-20.
This commit is contained in:
parent
64591b7657
commit
e20ab691c3
|
@ -1,3 +1,8 @@
|
||||||
|
2003-06-01 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
* src/winfonts/winfnt.c (FNT_Load_Glyph): Revert change from
|
||||||
|
2003-03-20.
|
||||||
|
|
||||||
2003-05-31 Werner Lemberg <wl@gnu.org>
|
2003-05-31 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
* include/freetype/fttrigon.h (FT_Vector_Normalize): Removed.
|
* include/freetype/fttrigon.h (FT_Vector_Normalize): Removed.
|
||||||
|
|
|
@ -198,6 +198,7 @@
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
FT_BASE_DEF( void )
|
FT_BASE_DEF( void )
|
||||||
ft_glyphslot_free_bitmap( FT_GlyphSlot slot )
|
ft_glyphslot_free_bitmap( FT_GlyphSlot slot )
|
||||||
{
|
{
|
||||||
|
|
|
@ -618,18 +618,34 @@
|
||||||
|
|
||||||
/* allocate and build bitmap */
|
/* allocate and build bitmap */
|
||||||
{
|
{
|
||||||
FT_Int pitch = ( bitmap->width + 7 ) >> 3;
|
FT_Memory memory = FT_FACE_MEMORY( slot->face );
|
||||||
|
FT_Int pitch = ( bitmap->width + 7 ) >> 3;
|
||||||
|
FT_Byte* column;
|
||||||
|
FT_Byte* write;
|
||||||
|
|
||||||
|
|
||||||
bitmap->pitch = pitch;
|
bitmap->pitch = pitch;
|
||||||
bitmap->rows = font->header.pixel_height;
|
bitmap->rows = font->header.pixel_height;
|
||||||
bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
|
bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
|
||||||
|
|
||||||
/* note: we don't allocate a new buffer for the bitmap since we */
|
/* note: since glyphs are stored in columns and not in rows we */
|
||||||
/* already store the images in the FT_Face */
|
/* can't use ft_glyphslot_set_bitmap */
|
||||||
ft_glyphslot_set_bitmap( slot, p );
|
if ( FT_ALLOC( bitmap->buffer, pitch * bitmap->rows ) )
|
||||||
|
goto Exit;
|
||||||
|
|
||||||
|
column = (FT_Byte*)bitmap->buffer;
|
||||||
|
|
||||||
|
for ( ; pitch > 0; pitch--, column++ )
|
||||||
|
{
|
||||||
|
FT_Byte* limit = p + bitmap->rows;
|
||||||
|
|
||||||
|
|
||||||
|
for ( write = column; p < limit; p++, write += bitmap->pitch )
|
||||||
|
*write = *p;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
slot->flags = FT_GLYPH_OWN_BITMAP;
|
||||||
slot->bitmap_left = 0;
|
slot->bitmap_left = 0;
|
||||||
slot->bitmap_top = font->header.ascent;
|
slot->bitmap_top = font->header.ascent;
|
||||||
slot->format = FT_GLYPH_FORMAT_BITMAP;
|
slot->format = FT_GLYPH_FORMAT_BITMAP;
|
||||||
|
|
Loading…
Reference in New Issue