summaryrefslogtreecommitdiff
path: root/pango/pango-font.h
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2017-09-05 07:37:31 -0400
committerBehdad Esfahbod <behdad@behdad.org>2018-01-03 12:41:46 +0000
commitefa66e7b634050ef395418b544b012a4a5183973 (patch)
tree4823301a56e843fb864b7e25b8aef5f530e51f2d /pango/pango-font.h
parent95c2aaaa9a1f0167e832a3d31700ae51e519fff4 (diff)
downloadpango-efa66e7b634050ef395418b544b012a4a5183973.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