GNOME Bugzilla – Bug 105553
There should be a way to disable fallback.
Last modified: 2004-12-22 21:47:04 UTC
It would be useful to be able to disable the mechanism that falls back on fonts other than the current font for characters not in the current font.
Created attachment 14200 [details] [review] Here's a patch that works for me.
Should definitely be an attribute of some sort, not a context option.
Created attachment 15856 [details] [review] proposed patch
+'true' or 'false' whether to fall back on other fonts when the active +font lacks characters that need to be drawn. Fallback is enabled by +default. Most applications should not disable fallback. +</para></listitem> Actually, the way it actually works doesn't match this very well: a) it's the _first_ font, not the explicitely specified font, which may seem strange. If the user specifies "helvetica", and there isn't helvetica on the system, it will apply to the first font in "sans" b) If the user specifies multiple fonts explicitely family="helvetica,arial", then using arial for some character counts as a fallback (assuming that helvetica is there)
Created attachment 16895 [details] [review] proposed patch attempt #3
Created attachment 16896 [details] simple test program for your enjoyment
Thinking abou this some, I like Patch #2 better than #3; 3 just gets really complex without necessarily making things more what people would expect. I think #2 is fine to commit, with these detailed comments: * for the GMarkup and function docs, I'd just say something like: fallback: If disabled, then characters will only be used from the closest matching font on the system. No fallback will be done to other fonts on the system that might contain the characters in the text. * There is no point in removing a padding member since your patch does break API compat for backends (which is OK); a backend must implement get_base_font(). + CHECK_DUPLICATE (lang); should be CHECK_DUPLICATE (fallback), I think.
Created attachment 24944 [details] [review] new patch that applies to HEAD (details rather different from #2)
Committed, with a few more changes suggested by Owen on irc. 2003-02-29 Noah Levitt <nlevitt@columbia.edu> * docs/pango_markup.sgml: * docs/tmpl/text-attributes.sgml: * pango/pango-attributes.c: * pango/pango-attributes.h: * pango/pango-context.c: * pango/pango-markup.c: New attribute to turn font fallback on or off. (#105553)