shithub: freetype+ttf2subf

Download patch

ref: 983d4358657e51d32c20b7fcfe7ceda5faaf62b9
parent: bee8886408a82c244956b76db4ab7b79cdca9079
author: Alexei Podtelezhnikov <[email protected]>
date: Sun Jan 30 17:13:51 EST 2022

[cache] Fix fallouts from edd4fedc5427.

Reported by Werner.

* src/cache/ftcimage.c (FTC_INode_New): Always initialize FT_Glyph.
* src/cache/ftcsbits.c (FTC_SNode_New): Always initialize FT_SBit.

git/fs: mount .git/fs: mount/attach disallowed
--- a/src/cache/ftcimage.c
+++ b/src/cache/ftcimage.c
@@ -74,6 +74,7 @@
 
       /* initialize its inner fields */
       FTC_GNode_Init( gnode, gindex, family );
+      inode->glyph = NULL;
 
       /* we will now load the glyph image */
       error = clazz->family_load_glyph( family, gindex, cache,
--- a/src/cache/ftcsbits.c
+++ b/src/cache/ftcsbits.c
@@ -248,7 +248,9 @@
       snode->count = count;
       for ( node_count = 0; node_count < count; node_count++ )
       {
-        snode->sbits[node_count].width = 255;
+        snode->sbits[node_count].width  = 255;
+        snode->sbits[node_count].height = 0;
+        snode->sbits[node_count].buffer = NULL;
       }
 
       error = ftc_snode_load( snode,