Missing glyphs are invisible, including tabs
|Reported by:||mmlr||Owned by:||mmlr|
|Has a Patch:||no||Platform:||All|
In #7075 there remains a problem with tabs that trigger missing glyphs. This is not visible in BTextViews or editors that actually implement tabs (i.e. rendering them at certain columns), but for cases where normal DrawString() is involved (and other font functions like StringWidth(), GetEscapements(), ...).
Missing glyphs are now (since hrev40172) completely invisible (like the tab and the newline from the wrapped and indented "Subject:" header in #7075) which is already an improvement over the randomly sized spaces that were inserted before that change.
Before the introduction of font fallbacks, those missing glyphs were render as boxes (or more correctly the missing glyphs were mapped to the "missing-glyph-box" and there never actually was a missing glyph in the end).
For your avarage missing glyphs it might be ok to be completely missing (though I find that rather problematic as you don't have any way to see that you're using a font with missing glyphs and the fallback failed to provide one as well) in case of a tab it should at least be rendered as a space (or multiple spaces). Since the tab is a special character that actually has a dynamic width this makes things a bit more complicated. Since LayoutGlyphs() constructs coordinates we could align tabs on some raster to emulate the dynamic width, though this might be problematic in cases where partial strings are handed to the string functions. Or the tab could simply always be replaced by a "constant width" * "font size" or "space width" * "some value (4 for example for 4 spaces per tab)" * "font size".
Since every other OS renders missing glyphs as the "missing-glyph-box" and this very glyph was made for exactly that purpose I'd suggest we change that back so missing glyphs are rendered as boxes again. Tabs should still be special cased as suggested above though.