[base] Make `find_unicode_charmap` a base function.

This is needed for forthcoming changes in the auto-hinter.

* include/freetype/internal/ftobjs.h, src/base/ftobjs.c: Updated.
This commit is contained in:
Craig White 2024-01-28 07:38:41 +01:00 committed by Werner Lemberg
parent f42ce25563
commit 813e081ec1
2 changed files with 25 additions and 15 deletions

View File

@ -275,6 +275,28 @@ FT_BEGIN_HEADER
FT_GlyphSlot slot,
FT_Render_Mode mode );
/**************************************************************************
*
* @Function:
* find_unicode_charmap
*
* @Description:
* This function finds a Unicode charmap, if there is one. And if there
* is more than one, it tries to favour the more extensive one, i.e., one
* that supports UCS-4 against those which are limited to the BMP (UCS-2
* encoding.)
*
* If a unicode charmap is found, `face->charmap` is set to it.
*
* This function is called from `open_face`, from `FT_Select_Charmap(...,
* FT_ENCODING_UNICODE)`, and also from `afadjust.c` in the 'autofit'
* module.
*/
FT_BASE( FT_Error )
find_unicode_charmap( FT_Face face );
#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
typedef void (*FT_Bitmap_LcdFilterFunc)( FT_Bitmap* bitmap,

View File

@ -1359,21 +1359,9 @@
}
/**************************************************************************
*
* @Function:
* find_unicode_charmap
*
* @Description:
* This function finds a Unicode charmap, if there is one.
* And if there is more than one, it tries to favour the more
* extensive one, i.e., one that supports UCS-4 against those which
* are limited to the BMP (said UCS-2 encoding.)
*
* This function is called from open_face() (just below), and also
* from FT_Select_Charmap( ..., FT_ENCODING_UNICODE ).
*/
static FT_Error
/* documentation is in ftobjs.h */
FT_BASE_DEF( FT_Error )
find_unicode_charmap( FT_Face face )
{
FT_CharMap* first;