*/
i3String *i3string_from_utf8(const char *from_utf8);
+/**
+ * Build an i3String from an UTF-8 encoded string in Pango markup.
+ *
+ */
+i3String *i3string_from_markup(const char *from_markup);
+
/**
* Build an i3String from an UTF-8 encoded string with fixed length.
* To be used when no proper NUL-terminaison is available.
*/
i3String *i3string_from_utf8_with_length(const char *from_utf8, size_t num_bytes);
+/**
+ * Build an i3String from an UTF-8 encoded string in Pango markup with fixed
+ * length.
+ *
+ */
+i3String *i3string_from_markup_with_length(const char *from_markup, size_t num_bytes);
+
/**
* Build an i3String from an UCS-2 encoded string.
* Returns the newly-allocated i3String.
*/
size_t i3string_get_num_bytes(i3String *str);
+/**
+ * Whether the given i3String is in Pango markup.
+ */
+bool i3string_is_markup(i3String *str);
+
/**
* Returns the number of glyphs in an i3String.
*
/**
* Loads a font for usage, also getting its height. If fallback is true,
- * the fonts 'fixed' or '-misc-*' will be loaded instead of exiting.
+ * the fonts 'fixed' or '-misc-*' will be loaded instead of exiting. If any
+ * font was previously loaded, it will be freed.
*
*/
i3Font load_font(const char *pattern, const bool fallback);
void set_font(i3Font *font);
/**
- * Frees the resources taken by the current font.
+ * Frees the resources taken by the current font. If no font was previously
+ * loaded, it simply returns.
*
*/
void free_font(void);