ecere/gfx/LFBDisplayDriver: Fixed wrong returned 'ascent' on Font
[sdk] / ecere / src / gfx / drivers / LFBDisplayDriver.ec
index 31d7e50..b427193 100644 (file)
@@ -415,6 +415,8 @@ class GlyphPack : BTNode
             }
             //FT_Set_Char_Size(fontEntry.face, (int)(font.size * 64), (int)(font.size * 64), 96, 96);
             fontEntry.scale = FaceSetCharSize(fontEntry.face, font.size);
+            if(!font.scale)
+               font.scale = fontEntry.scale;
             if(!c)
             {
                if(!fontEntry.face->units_per_EM)
@@ -705,6 +707,10 @@ public class Font : struct
       }
 #endif
    }
+   public property int ascent
+   {
+      get { return (int)(this ? ascent * scale : 0); }
+   }
 };
 
 public class LFBDisplay : struct
@@ -3666,6 +3672,7 @@ public class LFBDisplayDriver : DisplayDriver
       bool result = false;
       if(mesh.nVertices == nVertices)
       {
+         result = true;
          // Same number of vertices, adding features (Leaves the other features pointers alone)
          if(mesh.flags != flags)
          {
@@ -3695,6 +3702,7 @@ public class LFBDisplayDriver : DisplayDriver
       }
       else
       {
+         result = true;
          // New number of vertices, reallocate all current and new features
          flags |= mesh.flags;
          if(flags.vertices)