[dense] Add FT_Refresh_Glyph
* include/freetype/freetype.h: Declare FT_Refresh_Glyph * src/base/ftobjs.c: Implement FT_Refresh_Glyph
This commit is contained in:
parent
d074c39cd9
commit
e7c4fb9d13
|
@ -3323,6 +3323,31 @@ FT_BEGIN_HEADER
|
||||||
FT_UInt glyph_index,
|
FT_UInt glyph_index,
|
||||||
FT_Int32 load_flags );
|
FT_Int32 load_flags );
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
*
|
||||||
|
* @function:
|
||||||
|
* FT_Refresh_Glyph
|
||||||
|
*
|
||||||
|
* @description:
|
||||||
|
* Prepare the glyph at glyph_index for rendering. Resets the glyph
|
||||||
|
* if it has already been rendered
|
||||||
|
*
|
||||||
|
* @inout:
|
||||||
|
* face ::
|
||||||
|
* A handle to the target face object where the glyph is loaded.
|
||||||
|
*
|
||||||
|
* @input:
|
||||||
|
* glyph_index ::
|
||||||
|
* The index of the glyph in the font file.
|
||||||
|
*
|
||||||
|
* @return:
|
||||||
|
* FreeType error code. 0~means success.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
FT_EXPORT( FT_Error )
|
||||||
|
FT_Refresh_Glyph( FT_Face face,
|
||||||
|
FT_UInt glyph_index);
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
@ -893,6 +893,14 @@
|
||||||
|
|
||||||
|
|
||||||
/* documentation is in freetype.h */
|
/* documentation is in freetype.h */
|
||||||
|
FT_EXPORT_DEF( FT_Error )
|
||||||
|
FT_Refresh_Glyph( FT_Face face,
|
||||||
|
FT_UInt glyph_index)
|
||||||
|
|
||||||
|
{
|
||||||
|
ft_glyphslot_free_bitmap( face->glyph_array[glyph_index] );
|
||||||
|
face->glyph_array[glyph_index]->format = FT_GLYPH_FORMAT_OUTLINE;
|
||||||
|
}
|
||||||
|
|
||||||
FT_EXPORT_DEF( FT_Error )
|
FT_EXPORT_DEF( FT_Error )
|
||||||
FT_Load_Glyph( FT_Face face,
|
FT_Load_Glyph( FT_Face face,
|
||||||
|
|
Loading…
Reference in New Issue