+#ifdef USE_PANGO
+static inline int font_calculate_baseline(RrFont *f, gint height)
+{
+/* For my own reference:
+ * _________
+ * ^space/2 ^height ^baseline
+ * v_________|_ |
+ * | ^ascent | _ _
+ * | | | | |_ _____ _| |_ _ _
+ * | | | | _/ -_) \ / _| || |
+ * | v_________v \__\___/_\_\\__|\_, |
+ * | ^descent |__/
+ * __________|_v
+ * ^space/2 |
+ * V_________v
+ */
+ int asc = f->pango_ascent;
+ int ascdesc = asc + f->pango_descent;
+ int space = height * PANGO_SCALE - ascdesc;
+ int baseline = space / 2 + asc;
+ return baseline / PANGO_SCALE;
+}
+#endif
+