GNOME Bugzilla – Bug 505786
add text tag property for font fallback
Last modified: 2014-12-06 00:33:28 UTC
There's no way to set a 'no font fallback' text attribute on the text.
Created attachment 101640 [details] [review] proposed patch
Looks good. I wonder if there's a more generic way around wrapping each pango attribute separately (where PangoMarkup does the same too)... For example, the vertical text stuff has no property either.
Yeah, we have a bit of an extensibility problem here, since both GtkTextAppearance and GtkTextAttributes are simple structs, and both have only a few bits of padding left. So there is no chance to add support for things like letter spacing without finding some way to extend these structs. The way these things are shuttled around is a bit confusing, there is also GtkTextAttrAppearance...
Created attachment 104600 [details] [review] [PATCH] Add text tag property for disabling font fallback. Bug #505786. gtk/gtktextlayout.c | 12 +++++++++++- gtk/gtktexttag.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- gtk/gtktexttag.h | 7 +++++-- 3 files changed, 62 insertions(+), 6 deletions(-)
What's the gtk3 roadmap for this? Something like: - Add properties to PangoLayout - Make certain gtk widgets have a ->layout property which is a PangoLayout that holds the defaults for the PangoLayout's used by the widget. Every time the widget needs a PangoLayout, it will pango_layout_copy() the default-holder. Then we don't need to have parallel per-gtk-widget properties for every PangoLayout property. Something along those lines...
Same thing about PangoContext perhaps.
I've added fallback to GtkTextTag the other day... had no idea we had a patch waiting for this in bugzilla :-(