summaryrefslogtreecommitdiff
path: root/pango/pango-font.h
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2017-09-05 07:37:31 -0400
committerMatthias Clasen <mclasen@redhat.com>2017-12-23 17:04:27 -0500
commit55ee89371e180f4a8d30c10e3ff1a2d2eaaa16c8 (patch)
tree1ac380250472568577d847ce556f9dd57e04836c /pango/pango-font.h
parentf1b25f0c5192d7306cd30190e82c8f8e357882e7 (diff)
downloadpango-55ee89371e180f4a8d30c10e3ff1a2d2eaaa16c8.tar.gz
Add initial support for OpenType font variations
This commit lets PangoFontDescription carry font variation information as a string. Only pangocairo has been updated to make use of this information. We pass it to harfbuzz for shaping, and we pass it to cairo when creating scaled fonts.
Diffstat (limited to 'pango/pango-font.h')
-rw-r--r--pango/pango-font.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/pango/pango-font.h b/pango/pango-font.h
index a9702954..4af31a95 100644
--- a/pango/pango-font.h
+++ b/pango/pango-font.h
@@ -145,6 +145,7 @@ typedef enum {
* @PANGO_FONT_MASK_STRETCH: the font stretch is specified.
* @PANGO_FONT_MASK_SIZE: the font size is specified.
* @PANGO_FONT_MASK_GRAVITY: the font gravity is specified (Since: 1.16.)
+ * @PANGO_FONT_MASK_VARIATIONS: OpenType font variations are specified (Since: 1.42)
*
* The bits in a #PangoFontMask correspond to fields in a
* #PangoFontDescription that have been set.
@@ -156,7 +157,8 @@ typedef enum {
PANGO_FONT_MASK_WEIGHT = 1 << 3,
PANGO_FONT_MASK_STRETCH = 1 << 4,
PANGO_FONT_MASK_SIZE = 1 << 5,
- PANGO_FONT_MASK_GRAVITY = 1 << 6
+ PANGO_FONT_MASK_GRAVITY = 1 << 6,
+ PANGO_FONT_MASK_VARIATIONS = 1 << 7,
} PangoFontMask;
/* CSS scale factors (1.2 factor between each size) */
@@ -277,6 +279,15 @@ void pango_font_description_set_gravity (PangoFontDescript
PANGO_AVAILABLE_IN_1_16
PangoGravity pango_font_description_get_gravity (const PangoFontDescription *desc) G_GNUC_PURE;
+PANGO_AVAILABLE_IN_1_42
+void pango_font_description_set_variations_static (PangoFontDescription *desc,
+ const char *settings);
+PANGO_AVAILABLE_IN_1_42
+void pango_font_description_set_variations (PangoFontDescription *desc,
+ const char *settings);
+PANGO_AVAILABLE_IN_1_42
+const char *pango_font_description_get_variations (const PangoFontDescription *desc) G_GNUC_PURE;
+
PANGO_AVAILABLE_IN_ALL
PangoFontMask pango_font_description_get_set_fields (const PangoFontDescription *desc) G_GNUC_PURE;
PANGO_AVAILABLE_IN_ALL