[gnome-builder] pango: add quartz workaround



commit 905f4e5606d381074a60e02dedff38d6a139d84a
Author: Christian Hergert <christian hergert me>
Date:   Tue Sep 1 14:16:50 2015 -0700

    pango: add quartz workaround
    
    Pango on Quartz is giving us “condensed” back for font stretch. Until
    I know more about the situation, just disable that feature on quartz.
    We don’t really use it anyway.

 libide/util/ide-pango.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/libide/util/ide-pango.c b/libide/util/ide-pango.c
index 68400bf..ea4e13e 100644
--- a/libide/util/ide-pango.c
+++ b/libide/util/ide-pango.c
@@ -16,6 +16,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <gdk/gdk.h>
 #include <glib/gstdio.h>
 #include <math.h>
 
@@ -120,6 +121,13 @@ ide_pango_font_description_to_css (const PangoFontDescription *font_desc)
         }
     }
 
+#ifndef GDK_WINDOWING_QUARTZ
+  /*
+   * We seem to get "Condensed" for fonts on the Quartz backend,
+   * which is rather annoying as it results in us always hitting
+   * fallback (stretch) paths. So let's cheat and just disable
+   * stretch support for now on Quartz.
+   */
   if ((mask & PANGO_FONT_MASK_STRETCH))
     {
       switch (pango_font_description_get_stretch (font_desc))
@@ -164,6 +172,7 @@ ide_pango_font_description_to_css (const PangoFontDescription *font_desc)
           break;
         }
     }
+#endif
 
   if ((mask & PANGO_FONT_MASK_SIZE))
     {


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