freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] master 4ef8eed11: [truetype] Ingnore FT_LOAD_NO_BITMAP in bi


From: Werner Lemberg
Subject: [freetype2] master 4ef8eed11: [truetype] Ingnore FT_LOAD_NO_BITMAP in bitmap-only fonts.
Date: Tue, 31 Dec 2024 16:37:37 -0500 (EST)

branch: master
commit 4ef8eed11b719409d9fc284fb80d886e5bd0b28f
Author: Alexei Podtelezhnikov (Алексей Подтележников) <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov (Алексей Подтележников) <apodtele@gmail.com>

    [truetype] Ingnore FT_LOAD_NO_BITMAP in bitmap-only fonts.
    
    For consistency with other bitmap-only fonts, we should ignore this
    flag of the font is not scalable.
    
    * src/truetype/ttgload.c (TT_Load_Glyph): Check if face is scalable
    when checking for FT_LOAD_NO_BITMAP.
    
    * docs/CHANGES: Start new chapter wtith this change.
---
 docs/CHANGES           | 15 ++++++++++++++-
 src/truetype/ttgload.c |  7 ++++---
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/docs/CHANGES b/docs/CHANGES
index bd7b12a8a..3b5d0d5ef 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -1,3 +1,16 @@
+CHANGES BETWEEN 2.13.3 and 2.13.4 (2025-Mmm-DD)
+
+  I. IMPORTANT CHANGES
+
+  - Bitmap-only TrueType fonts  now ignore FT_LOAD_NO_BITMAP flag  and
+    proceed loading bitmaps instead of giving an error.  This behavior
+    is documented  and  implemented  for other bitmap-only fonts.  The
+    flag  has always meant  to suppress the bitmap strikes in favor of
+    outlines, not to ban them completely.
+
+
+======================================================================
+
 CHANGES BETWEEN 2.13.2 and 2.13.3 (2024-Aug-11)
 
   I. IMPORTANT CHANGES
@@ -579,7 +592,7 @@ CHANGES BETWEEN 2.9.1 and 2.10.0 (2019-Mar-15)
           Set text foreground color for palette index 0xFFFF.
 
         FT_Get_Color_Glyph_Layer
-          Get color layers for a given glyph (using an interator
+          Get color layers for a given glyph (using an iterator
           object).
 
         FT_Bitmap_Blend
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 732cedacd..ea604adfe 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -2427,9 +2427,10 @@
 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
 
     /* try to load embedded bitmap (if any) */
-    if ( size->strike_index != 0xFFFFFFFFUL      &&
-         ( load_flags & FT_LOAD_NO_BITMAP ) == 0 &&
-         IS_DEFAULT_INSTANCE( glyph->face )      )
+    if ( size->strike_index != 0xFFFFFFFFUL  &&
+         !( load_flags & FT_LOAD_NO_BITMAP &&
+            FT_IS_SCALABLE( glyph->face )  ) &&
+         IS_DEFAULT_INSTANCE( glyph->face )  )
     {
       FT_Fixed  x_scale = size->root.metrics.x_scale;
       FT_Fixed  y_scale = size->root.metrics.y_scale;



reply via email to

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