forked from pool/freetype2
75 lines
3.0 KiB
Diff
75 lines
3.0 KiB
Diff
|
temporary revert of
|
||
|
|
||
|
https://gitlab.freedesktop.org/freetype/freetype/-/commit/7809007a5b88b15207d6c6680cd8a979b122eafa.patch
|
||
|
due to https://gitlab.freedesktop.org/freetype/freetype/-/issues/1148
|
||
|
|
||
|
--- freetype-2.12.0/src/truetype/ttgload.c 2022-03-30 13:17:39.000000000 +0200
|
||
|
+++ freetype-2.12.0/src/truetype/ttgload.c 2022-04-19 11:48:18.687226973 +0200
|
||
|
@@ -2691,28 +2691,6 @@
|
||
|
exec->ignore_x_mode = FALSE;
|
||
|
#endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
|
||
|
|
||
|
-#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
|
||
|
- /*
|
||
|
- * Toggle backward compatibility according to what font wants, except
|
||
|
- * when
|
||
|
- *
|
||
|
- * 1) we have a `tricky' font that heavily relies on the interpreter to
|
||
|
- * render glyphs correctly, for example DFKai-SB, or
|
||
|
- * 2) FT_RENDER_MODE_MONO (i.e, monochome rendering) is requested.
|
||
|
- *
|
||
|
- * In those cases, backward compatibility needs to be turned off to get
|
||
|
- * correct rendering. The rendering is then completely up to the
|
||
|
- * font's programming.
|
||
|
- *
|
||
|
- */
|
||
|
- if ( driver->interpreter_version == TT_INTERPRETER_VERSION_40 &&
|
||
|
- subpixel_hinting_lean &&
|
||
|
- !FT_IS_TRICKY( glyph->face ) )
|
||
|
- exec->backward_compatibility = !( exec->GS.instruct_control & 4 );
|
||
|
- else
|
||
|
- exec->backward_compatibility = FALSE;
|
||
|
-#endif /* TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL */
|
||
|
-
|
||
|
exec->pedantic_hinting = FT_BOOL( load_flags & FT_LOAD_PEDANTIC );
|
||
|
loader->exec = exec;
|
||
|
loader->instructions = exec->glyphIns;
|
||
|
--- freetype-2.12.0/src/truetype/ttinterp.c 2022-01-27 08:43:19.000000000 +0100
|
||
|
+++ freetype-2.12.0/src/truetype/ttinterp.c 2022-04-19 11:46:46.185783645 +0200
|
||
|
@@ -7770,6 +7770,35 @@
|
||
|
#endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
|
||
|
|
||
|
|
||
|
+#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
|
||
|
+ exc->iup_called = FALSE;
|
||
|
+#endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
|
||
|
+
|
||
|
+#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
|
||
|
+ /*
|
||
|
+ * Toggle backward compatibility according to what font wants, except
|
||
|
+ * when
|
||
|
+ *
|
||
|
+ * 1) we have a `tricky' font that heavily relies on the interpreter to
|
||
|
+ * render glyphs correctly, for example DFKai-SB, or
|
||
|
+ * 2) FT_RENDER_MODE_MONO (i.e, monochome rendering) is requested.
|
||
|
+ *
|
||
|
+ * In those cases, backward compatibility needs to be turned off to get
|
||
|
+ * correct rendering. The rendering is then completely up to the
|
||
|
+ * font's programming.
|
||
|
+ *
|
||
|
+ */
|
||
|
+ if ( SUBPIXEL_HINTING_MINIMAL &&
|
||
|
+ exc->subpixel_hinting_lean &&
|
||
|
+ !FT_IS_TRICKY( &exc->face->root ) )
|
||
|
+ exc->backward_compatibility = !( exc->GS.instruct_control & 4 );
|
||
|
+ else
|
||
|
+ exc->backward_compatibility = FALSE;
|
||
|
+
|
||
|
+ exc->iupx_called = FALSE;
|
||
|
+ exc->iupy_called = FALSE;
|
||
|
+#endif
|
||
|
+
|
||
|
/* We restrict the number of twilight points to a reasonable, */
|
||
|
/* heuristic value to avoid slow execution of malformed bytecode. */
|
||
|
num_twilight_points = FT_MAX( 30,
|