[pango/pango-1-48] Support antialias option in pango-view with the FreeType backend



commit 8011082ecdba71cd3b4372ca0af032b95426770b
Author: Peng Wu <pwu redhat com>
Date:   Thu Sep 9 12:06:10 2021 +0800

    Support antialias option in pango-view with the FreeType backend

 utils/viewer-pangoft2.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/utils/viewer-pangoft2.c b/utils/viewer-pangoft2.c
index 3a698b8e..de948307 100644
--- a/utils/viewer-pangoft2.c
+++ b/utils/viewer-pangoft2.c
@@ -34,6 +34,11 @@ static void
 substitute_func (FcPattern *pattern,
                 gpointer   data G_GNUC_UNUSED)
 {
+  if (opt_antialias != ANTIALIAS_DEFAULT)
+    {
+      FcPatternDel (pattern, FC_ANTIALIAS);
+      FcPatternAddBool (pattern, FC_ANTIALIAS, opt_antialias != ANTIALIAS_NONE);
+    }
   if (opt_hinting != HINT_DEFAULT)
     {
       FcPatternDel (pattern, FC_HINTING);


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