Closed Bug 227374 Opened 21 years ago Closed 21 years ago

no space between bitmap menu font letters & underscores

Categories

(Core Graveyard :: GFX: OS/2, defect)

x86
OS/2
defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mrmazda, Assigned: jhpedemonte)

Details

(Keywords: fixed1.4.2)

Attachments

(6 files)

2003120108 trunk Underscores in menus should be under the letters, not touching them. Helv and tms rmn touch. Normal menu font on OS/2 is warpsans, but at high resolution and maximum OS/2 DPI of 120, warpsans, available only in 9pt, is too small. 10.helv makes a nice size menu choice @ 1280x960, but not so nice in Moz.
Netscape uses the OS menus, where the word is written and then an underscore added to the mnemonic character. Mozilla draws it's own menus, and just draws an underlined character, followed by non-underlined characters for everything else. Unfortunately, some fonts (such as Helv and Tms Rmn) tell us to draw the underscore touching the characters at 10 point.
Status: NEW → ASSIGNED
Attached file Testcase
Load this testcase and cycle through the fonts in preferences. Most fonts are fine; the underscore appears where you would expect. Some other fonts, though (particularly bitmap fonts), have the underscore in odd locations for the different point sizes.
Attached patch patchSplinter Review
This patch makes it so we ignore what the font's idea of the underline position is. Instead, I took the fallback calculation from GTK; this seems to produce much nicer results across the board.
Attachment #136749 - Flags: review?(mkaply)
I'm not sure if this is a related problem, but there is a problem with underscores on japanese sites, take http://www.ibm.com/jp/ for instance. Use 'Times New Roman WT J' for Serif & Sans-serif. Observe the underlines painted when moving the mouse over links. (It looks like the fonts are painted too low judging from the text and bullet positions.) I have 1600x1200 here, SNAP 2.1.3 with sddfontsize=small & sddfontdpi=96m. It looks just as bad both with and without the Innotek Fontengine.
I think that also in the rendering area, underlines are painted too close sometimes, mainly for smaller font sizes. This occurs with and without the InnoTek Font Engine. I did not see this on either Linux or Windows (running at 1600x1200 with small font sizes). It should be possible to produce results identical to Windows as we managed to get this working for OpenOffice for OS/2 and our font engine (which provides a GPI interface used by a GPI to GDI library, used by OpenOffice, etc.).
This isn't limited to bitmapped fonts. At 800x600 resolution, many vector fonts don't have to be particularly small to lack the space. At high resolution, it appears the only vector fonts lacking the space are very small, around 0.6 em.
Knut: On my system, at least, www.ibm.com/jp looks better with the patch here. Have you tried this patch? Felix's testcases also look better with the patch.
Comment on attachment 136749 [details] [diff] [review] patch put this in 1.4.2 as well.
Attachment #136749 - Flags: review?(mkaply)
Attachment #136749 - Flags: review+
Attachment #136749 - Flags: approval1.4.2+
Comment on attachment 136749 [details] [diff] [review] patch sr=blizzard (platform specific) a=mkaply for 1.6 as well
Attachment #136749 - Flags: superreview+
Attachment #136749 - Flags: approval1.6+
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Keywords: fixed1.4.2
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: