freetype-commit
[Top][All Lists]
Advanced

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

[freetype2-demos] master e1e334b 1/2: * src/ftcommon.c (FTDemo_Draw_Head


From: Werner Lemberg
Subject: [freetype2-demos] master e1e334b 1/2: * src/ftcommon.c (FTDemo_Draw_Header): Show sizing errors again.
Date: Sun, 8 Jan 2023 23:57:18 -0500 (EST)

branch: master
commit e1e334bc2b230781eb753c5fc75cfb5e4ce6a020
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>

    * src/ftcommon.c (FTDemo_Draw_Header): Show sizing errors again.
---
 src/ftcommon.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/ftcommon.c b/src/ftcommon.c
index 501f191..19fa446 100644
--- a/src/ftcommon.c
+++ b/src/ftcommon.c
@@ -1213,11 +1213,10 @@
     /* The demo programs are mainly investigation tools.  Normal          */
     /* applications don't need all the extra validity checks to display   */
     /* something for invalid fonts; instead, they can simply reject them. */
-    if ( ( face->size                                      &&
-           abs( ptsize * res / 64
-                  - face->size->metrics.y_ppem * 72 ) > 36 ) ||
-         error_code                                          )
+    if ( abs( ptsize * res / 72 - ppem ) > 32 ||
+         error_code                           )
     {
+      x = strbuf_len( buf );
       strbuf_reset( buf );
 
       switch ( error_code )



reply via email to

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