Closed Bug 130635 Opened 23 years ago Closed 2 years ago

Linux device context code for getting system "field", "button", etc. fonts sucks

Categories

(Core :: Widget: Gtk, defect, P5)

All
Linux
defect

Tracking

()

RESOLVED INACTIVE

People

(Reporter: bzbarsky, Unassigned)

Details

(Whiteboard: [whitebox])

650 nsSystemFontsGTK::nsSystemFontsGTK(float aPixelsToTwips) 651 : mDefaultFont("sans-serif", NS_FONT_STYLE_NORMAL, NS_FONT_VARIANT_NORMAL, 652 NS_FONT_WEIGHT_NORMAL, NS_FONT_DECORATION_NONE, 653 DEFAULT_TWIP_FONT_SIZE), 654 mButtonFont("sans-serif", NS_FONT_STYLE_NORMAL, NS_FONT_VARIANT_NORMAL, 655 NS_FONT_WEIGHT_NORMAL, NS_FONT_DECORATION_NONE, 656 DEFAULT_TWIP_FONT_SIZE), 657 mFieldFont("sans-serif", NS_FONT_STYLE_NORMAL, NS_FONT_VARIANT_NORMAL, 658 NS_FONT_WEIGHT_NORMAL, NS_FONT_DECORATION_NONE, 659 DEFAULT_TWIP_FONT_SIZE), 660 mMenuFont("sans-serif", NS_FONT_STYLE_NORMAL, NS_FONT_VARIANT_NORMAL, 661 NS_FONT_WEIGHT_NORMAL, NS_FONT_DECORATION_NONE, 662 DEFAULT_TWIP_FONT_SIZE) (this is from nsDeviceContextGTK.cpp) At least for eSystemFont_Field this is utterly wrong -- see bug 53617. I'll test later tonight whether this setting is actually overridden later by the code that creates an entry field widget...
Well... I'm _really_ confused now. 1) If I change the "sans-serif" to "monospace" and leave the |GtkWidget *entry = gtk_entry_new();| code in, nothing happens (sort of expected). 2) If I leave the "sans-serif" and comment out the entry widget creation, the font used in textfields becomes a monospace font! Item 2 makes no sense to me (though in my opinion that is the correct behavior).
From the "parent" bug 25657: James Lariviere wrote: > mozilla uses a fixed font for > textareas while everything else is proportional. Seems reasonable that > textareas should use the same font as the other controls. And, just to be clear, this should surely default to monospaced (so that the WIDTH attribute of TEXT TYPE="INPUT" actually has any useful function in HTML at all), and only become proportional/variable width IF the page author manually codes it that way. Right?
Priority: -- → P2
Target Milestone: --- → Future
cc'ing myself
Whiteboard: [dev notes]
Whiteboard: [dev notes] → [whitebox]
QA Contact: ian → style-system
Assignee: rods → nobody
Component: Style System (CSS) → Widget: Gtk
Priority: P2 → --
QA Contact: style-system → gtk
Target Milestone: Future → ---
Severity: normal → S3
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.