Consider making pango an implementation detail
Making pango an implementation detail would allow us to refactor and improve our text handling internally. See for example pango!593
Looking at how pango is currently exposed in our apis:
-
gdk
- PangoDirection for keyboard direction
- clip region for PangoLayout/PangoLayoutLine
-
gsk
- PangoFont, PangoGlyphString in text nodes
- uses pango_font_map_reload_font
- uses pango_cairo_show_glyph_string
-
gtk
- Setters for PangoAttrList
- Setters for PangoTabArray
- Setters for PangoFontDescription
- Setters PangoWrapMode
- Setters PangoEllipsizeMode
- gtk_widget_create_pango_context
- gtk_widget_create_pango_layout
- gtk_label_get_layout
- font choosers currently use PangoFontMap, PangoFontFamily, PangoFontFace, PangoFont
Suggested changes:
-
Drop uses of keyboard direction for bidi, get rid of device direction apis !8031 (merged) -
Make clip region code internal, drop the api -
Make text nodes use hb types ? Needs research -
Keep PangoAttrList/PangoTabArray/PangoFontDescription and enums or wrap them in GTK types -
Drop GtkWidgets PangoContext and PangoLayout apis -
Drop gtk_label_get_layout -
Make font choosers return PangoFontDescription instead of font, face or family objects -
Add an "add font" api (could allow adding font from files as well as hb_face_t)
Edited by Matthias Clasen