[pango/simple-fontmap: 15/18] pango-view: Add a condensed Cantarell variant




commit 079421a526ca185cc5d679ab250f90ceea2f3f5e
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Oct 26 23:47:11 2021 -0400

    pango-view: Add a condensed Cantarell variant
    
    This is to test transform support more.

 utils/viewer-pangocairo.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/utils/viewer-pangocairo.c b/utils/viewer-pangocairo.c
index 9b1f1f07..578f65a8 100644
--- a/utils/viewer-pangocairo.c
+++ b/utils/viewer-pangocairo.c
@@ -72,6 +72,12 @@ pangocairo_view_create (const PangoViewer *klass G_GNUC_UNUSED)
           slanted = pango_hb_face_new_transformed (PANGO_HB_FACE (face), "Italic", &matrix);
           pango_simple_font_map_add_face (PANGO_SIMPLE_FONT_MAP (instance->fontmap), slanted);
           g_object_unref (slanted);
+
+          matrix = (PangoMatrix) { 0.5, 0., 0., 1., 0., 0. };
+
+          slanted = pango_hb_face_new_transformed (PANGO_HB_FACE (face), "Condensed", &matrix);
+          pango_simple_font_map_add_face (PANGO_SIMPLE_FONT_MAP (instance->fontmap), slanted);
+          g_object_unref (slanted);
         }
 
       fam = pango_font_map_get_family (instance->fontmap, "Liberation Mono");


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