font chooser: Add font features

Populate the tweak page with OpenType font features.
This commit is contained in:
Matthias Clasen
2018-03-31 09:37:18 -04:00
parent b57e10ad60
commit d60cd1f49f
11 changed files with 1194 additions and 6 deletions

View File

@ -49,6 +49,7 @@ typedef gboolean (*GtkFontFilterFunc) (const PangoFontFamily *family,
* @GTK_FONT_CHOOSER_LEVEL_FAMILY: Allow selecting a font family
* @GTK_FONT_CHOOSER_LEVEL_STYLE: Allow selecting a specific font face
* @GTK_FONT_CHOOSER_LEVEL_SIZE: Allow selecting a specific font size
* @GTK_FONT_CHOOSER_LEVEL_FEATURES: Allow selecting specific OpenType font features
*
* This enumeration specifies the granularity of font selection
* that is desired in a font chooser.
@ -57,9 +58,10 @@ typedef gboolean (*GtkFontFilterFunc) (const PangoFontFamily *family,
* ignore unknown values.
*/
typedef enum {
GTK_FONT_CHOOSER_LEVEL_FAMILY = 0,
GTK_FONT_CHOOSER_LEVEL_STYLE = 1 << 0,
GTK_FONT_CHOOSER_LEVEL_SIZE = 1 << 1
GTK_FONT_CHOOSER_LEVEL_FAMILY = 0,
GTK_FONT_CHOOSER_LEVEL_STYLE = 1 << 0,
GTK_FONT_CHOOSER_LEVEL_SIZE = 1 << 1,
GTK_FONT_CHOOSER_LEVEL_FEATURES = 1 << 2
} GtkFontChooserLevel;
#define GTK_TYPE_FONT_CHOOSER (gtk_font_chooser_get_type ())