freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] adjust 813e081ec 1/7: [base] Make `find_unicode_charmap` a b


From: Werner Lemberg
Subject: [freetype2] adjust 813e081ec 1/7: [base] Make `find_unicode_charmap` a base function.
Date: Sun, 14 Apr 2024 10:04:04 -0400 (EDT)

branch: adjust
commit 813e081ec18c3bb00fc022041c02a8ed31e6533d
Author: Craig White <gerzytet@gmail.com>
Commit: Werner Lemberg <wl@gnu.org>

    [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.
---
 include/freetype/internal/ftobjs.h | 22 ++++++++++++++++++++++
 src/base/ftobjs.c                  | 18 +++---------------
 2 files changed, 25 insertions(+), 15 deletions(-)

diff --git a/include/freetype/internal/ftobjs.h 
b/include/freetype/internal/ftobjs.h
index e6333c2aa..b6b35a912 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -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,
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 9b97820c3..348bb2a26 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]