summaryrefslogtreecommitdiff
path: root/testsuite/reftests/letter-spacing.c
diff options
context:
space:
mode:
authorPaolo Borelli <pborelli@gnome.org>2015-07-04 19:56:40 +0200
committerPaolo Borelli <pborelli@gnome.org>2015-07-06 00:04:05 +0200
commita19331f2313ba47ce15c06f3d8485e68474baa4e (patch)
tree256b50ddc5814d5421d2971758999deb9b10d323 /testsuite/reftests/letter-spacing.c
parentb92c530a61420fc039048aff4feb3f019dc7cdfe (diff)
downloadgtk+-a19331f2313ba47ce15c06f3d8485e68474baa4e.tar.gz
label: add support for CSS letter-spacing property
Support letter-spacing CSS property on GtkLabel. Reftest is included.
Diffstat (limited to 'testsuite/reftests/letter-spacing.c')
-rw-r--r--testsuite/reftests/letter-spacing.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/reftests/letter-spacing.c b/testsuite/reftests/letter-spacing.c
new file mode 100644
index 0000000000..5e876f077e
--- /dev/null
+++ b/testsuite/reftests/letter-spacing.c
@@ -0,0 +1,30 @@
+/*
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include <gtk/gtk.h>
+
+
+G_MODULE_EXPORT void
+set_letter_spacing (GtkLabel *label)
+{
+ PangoAttrList *attrs;
+
+ attrs = pango_attr_list_new ();
+ pango_attr_list_insert (attrs, pango_attr_letter_spacing_new (10 * PANGO_SCALE));
+ gtk_label_set_attributes (label, attrs);
+ pango_attr_list_unref (attrs);
+}