summaryrefslogtreecommitdiffstats
path: root/src/style-internal.h
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2015-05-12 19:43:24 +0000
committertavmjong-free <tavmjong@free.fr>2015-05-12 19:43:24 +0000
commitc1b1d511b45348d8bccc5d22cd3471bb540cde12 (patch)
treee8a150c6496b35d56256bf74ef49140e6dab0c57 /src/style-internal.h
parentpackaging/macosx: fix print preview (Gtk+ itself only sets Preview.app as def... (diff)
downloadinkscape-c1b1d511b45348d8bccc5d22cd3471bb540cde12.tar.gz
inkscape-c1b1d511b45348d8bccc5d22cd3471bb540cde12.zip
GUI for font-variant-xxx, parse 'font-variant-ligatures'. This is a work in progress.
(bzr r14148)
Diffstat (limited to 'src/style-internal.h')
-rw-r--r--src/style-internal.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/style-internal.h b/src/style-internal.h
index a8f0c5096..ea966866a 100644
--- a/src/style-internal.h
+++ b/src/style-internal.h
@@ -510,6 +510,55 @@ private:
};
+/// SPIEnum w/ bits, allows values with multiple key words.
+class SPIEnumBits : public SPIEnum
+{
+
+public:
+ SPIEnumBits() :
+ SPIEnum( "anonymous_enumbits", NULL )
+ {}
+
+ SPIEnumBits( Glib::ustring const &name, SPStyleEnum const *enums, unsigned value = 0, bool inherits = true ) :
+ SPIEnum( name, enums, value, inherit )
+ {}
+
+ virtual ~SPIEnumBits()
+ {}
+
+ virtual void read( gchar const *str );
+ virtual const Glib::ustring write( guint const flags = SP_STYLE_FLAG_IFSET,
+ SPIBase const *const base = NULL ) const;
+
+};
+
+
+/// SPIEnum w/ extra bits. The 'font-variants-ligatures' property is a complete mess that needs
+/// special handling. For OpenType fonts the values 'common-ligatures', 'contextual',
+/// 'no-discretionary-ligatures', and 'no-historical-ligatures' are not useful but we still must be
+/// able to parse them.
+class SPILigatures : public SPIEnum
+{
+
+public:
+ SPILigatures() :
+ SPIEnum( "anonymous_enumligatures", NULL )
+ {}
+
+ SPILigatures( Glib::ustring const &name, SPStyleEnum const *enums) :
+ SPIEnum( name, enums,
+ SP_CSS_FONT_VARIANT_LIGATURES_COMMON | SP_CSS_FONT_VARIANT_LIGATURES_CONTEXTUAL)
+ {}
+
+ virtual ~SPILigatures()
+ {}
+
+ virtual void read( gchar const *str );
+ virtual const Glib::ustring write( guint const flags = SP_STYLE_FLAG_IFSET,
+ SPIBase const *const base = NULL ) const;
+};
+
+
/// String type internal to SPStyle.
// Used for 'marker', ..., 'font', 'font-family', 'inkscape-font-specification'
class SPIString : public SPIBase