[gnome-applets] sticky-notes: handle new pango variants
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets] sticky-notes: handle new pango variants
- Date: Fri, 25 Feb 2022 20:07:26 +0000 (UTC)
commit 883c4812a75542749a760a825ad682c431ea736e
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Fri Feb 25 21:56:12 2022 +0200
sticky-notes: handle new pango variants
configure.ac | 8 ++++++++
gnome-applets/sticky-notes/sticky-notes.c | 22 ++++++++++++++++++++++
2 files changed, 30 insertions(+)
---
diff --git a/configure.ac b/configure.ac
index 715d11575..1bb113bd6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -313,6 +313,14 @@ AS_IF([test "x$have_tracker_search_bar" = "xyes"], [
AM_CONDITIONAL(HAVE_TRACKER_SEARCH_BAR, test "$have_tracker_search_bar" = "yes")
+dnl **************************************************************************
+dnl Pango
+dnl **************************************************************************
+
+PKG_CHECK_EXISTS([pango >= 1.50.0],
+ AC_DEFINE([HAVE_PANGO_1_50_0], [1],
+ [Define if pango is 1.50.0 or newer]))
+
dnl **************************************************************************
dnl GResource
dnl **************************************************************************
diff --git a/gnome-applets/sticky-notes/sticky-notes.c b/gnome-applets/sticky-notes/sticky-notes.c
index 0f6eedad9..5d2b5e2e4 100644
--- a/gnome-applets/sticky-notes/sticky-notes.c
+++ b/gnome-applets/sticky-notes/sticky-notes.c
@@ -864,6 +864,28 @@ get_font_variant_from (PangoFontDescription *font_desc)
font_variant = "small-caps";
break;
+#ifdef HAVE_PANGO_1_50_0
+ case PANGO_VARIANT_ALL_SMALL_CAPS:
+ font_variant = "all-small-caps";
+ break;
+
+ case PANGO_VARIANT_PETITE_CAPS:
+ font_variant = "petite-caps";
+ break;
+
+ case PANGO_VARIANT_ALL_PETITE_CAPS:
+ font_variant = "all-petite-caps";
+ break;
+
+ case PANGO_VARIANT_UNICASE:
+ font_variant = "unicase";
+ break;
+
+ case PANGO_VARIANT_TITLE_CAPS:
+ font_variant = "title-caps";
+ break;
+#endif
+
case PANGO_VARIANT_NORMAL:
default:
font_variant = "normal";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]