diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-08-29 15:53:48 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-08-31 14:29:56 -0400 |
commit | fd51b46898ac9c880bb9552c3e301bfef7ac22bd (patch) | |
tree | 5afaca48cf1ecdcac7d4e91c7db80ddb484c5267 /pango/pango-attributes.h | |
parent | 303b4fb73eb8848d18abbda4d151461bd86f1000 (diff) | |
download | pango-fd51b46898ac9c880bb9552c3e301bfef7ac22bd.tar.gz |
Implement font-dependent scaling
Add a new font-scale attribute to indicate font size
changes due to super- and subscript shifts, and handle
it during item post-processing to find the right font
sizes.
Diffstat (limited to 'pango/pango-attributes.h')
-rw-r--r-- | pango/pango-attributes.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h index 1c9df2c5..59183a60 100644 --- a/pango/pango-attributes.h +++ b/pango/pango-attributes.h @@ -79,7 +79,8 @@ typedef struct _PangoAttrFontFeatures PangoAttrFontFeatures; * @PANGO_ATTR_ABSOLUTE_LINE_HEIGHT: line height ([struct@Pango.AttrInt]). Since: 1.50 * @PANGO_ATTR_WORD: override segmentation to classify the range of the attribute as a single word ([struct@Pango.AttrInt]). Since 1.50 * @PANGO_ATTR_SENTENCE: override segmentation to classify the range of the attribute as a single sentence ([struct@Pango.AttrInt]). Since 1.50 - * @PANGO_ATTR_BASELINE_SHIFT: baseline displacement ([struct@Pango.AttrSize]). Since 1.50 + * @PANGO_ATTR_BASELINE_SHIFT: baseline displacement ([struct@Pango.AttrInt]). Since 1.50 + * @PANGO_ATTR_FONT_SCALE: font-relative size change ([struct@Pango.AttrInt]). Since 1.50 * * The `PangoAttrType` distinguishes between different types of attributes. * @@ -127,6 +128,7 @@ typedef enum PANGO_ATTR_WORD, /* PangoAttrInt */ PANGO_ATTR_SENTENCE, /* PangoAttrInt */ PANGO_ATTR_BASELINE_SHIFT, /* PangoAttrSize */ + PANGO_ATTR_FONT_SCALE, /* PangoAttrInt */ } PangoAttrType; /** @@ -245,6 +247,12 @@ typedef enum { PANGO_BASELINE_SHIFT_SUBSCRIPT, } PangoBaselineShift; +typedef enum { + PANGO_FONT_SCALE_NONE, + PANGO_FONT_SCALE_SUPERSCRIPT, + PANGO_FONT_SCALE_SUBSCRIPT, +} PangoFontScale; + /** * PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING: * @@ -536,6 +544,8 @@ PANGO_AVAILABLE_IN_ALL PangoAttribute * pango_attr_rise_new (int rise); PANGO_AVAILABLE_IN_1_50 PangoAttribute * pango_attr_baseline_shift_new (int shift); +PANGO_AVAILABLE_IN_1_50 +PangoAttribute * pango_attr_font_scale_new (PangoFontScale scale); PANGO_AVAILABLE_IN_ALL PangoAttribute * pango_attr_scale_new (double scale_factor); PANGO_AVAILABLE_IN_1_4 |