Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#7077 closed bug (fixed)

Missing glyphs are invisible, including tabs

Reported by: mmlr Owned by: mmlr
Priority: normal Milestone: R1
Component: Servers/app_server Version: R1/alpha2
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

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.

Change History (3)

comment:1 Changed 9 years ago by mmlr

Owner: changed from axeld to mmlr
Status: newin-progress

As clarified by Stephan on the commits mailing list the missing boxes is a regression from a rewrite. I'm going to re-implement the "missing-glyph-box" mapping then and will see what to do about implementing the special tab rendering.

comment:2 Changed 9 years ago by mmlr

Resolution: fixed
Status: in-progressclosed

Fixed in hrev40174.

comment:3 Changed 9 years ago by korli

BTW is #6967 related ?

Note: See TracTickets for help on using tickets.