Need special font for form controls

VERIFIED INVALID

Status

()

Core
CSS Parsing and Computation
P3
critical
VERIFIED INVALID
18 years ago
17 years ago

People

(Reporter: rods (gone), Assigned: Pierre Saslawsky)

Tracking

Trunk
x86
Windows NT
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [nsbeta2-])

Attachments

(1 attachment)

(Reporter)

Description

18 years ago
I need a a special font for form control buttons and selects. The text field 
uses moz-fixed, which sets a specific monospace font and size that is then 
overridable.

I need the same for but for a sans-serif font. It could be called 
"moz-variable-width-font" or something like that. The problem today is if I set 
the font in the style shett to the correct family and size to make the form 
controls look and size correctly then the font isn't overridable ny use style 
sheets or inline style.

It is getting late in the M15 cycle for this but this is definitely a beta2 bug
(Reporter)

Comment 1

18 years ago
markig as beta2
Keywords: beta2
(Assignee)

Comment 2

18 years ago
If I'm correct, the meaning of '-moz-fixed' is "use the user's fixed font *and* 
size". It is the only difference with 'monospace' which means "use the user's 
fixed font".

I understand we may need someday a '-moz-variable-width-font' but for the form 
controls you mentioned, we should the CSS2 and CSS3 system fonts described in
  http://www.w3.org/TR/WD-CSS2/fonts.html#propdef-font
  http://www.w3.org/TR/2000/WD-css3-userint-20000216#font

The constants are currently defined in nsIDeviceContext.h 
(eSystemAttr_Font_Button, eSystemAttr_Font_PullDownMenu...). Later, they may move 
to the LookAndFeel.

Marking as Invalid. Please reopen if it doesn't do what you are looking for.
Status: NEW → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → INVALID

Updated

18 years ago
Keywords: nsbeta2

Comment 3

18 years ago
Setting self to QAContact while chrisd out on sabbatical...

Rod, could you add comments on this one?  Thanks.  -ckritzer
QA Contact: chrisd → ckritzer
(Reporter)

Comment 4

18 years ago
Pierre,

I was having problems getting this to work and marc and I took a quick look. It 
appears that when "font-family: button;" is specified, ParseFamily in the 
CSSParser doesn't convert the text "button" to the proper enum. 

MapDeclarationFontInto in nsCSSStyleRule first checks to see if it has a string 
which it does and the it tries to find a fon for it. it should fail on the check 
for a string and drop down into where it is checking for enums.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Target Milestone: --- → M16
(Assignee)

Comment 5

18 years ago
Closed as invalid again. System fonts are only defined for the 'font' property, 
not for 'font-family', because (per the spec) system fonts can only be accessed 
as a whole; that is, the font-family, size, weight, style, etc. are all set at 
the same time. See the spec at the two URLs above for more info.

Also, you are not allowed to write "font: 32px button" but you can write "font: 
button; font-size: 32px".
Status: REOPENED → RESOLVED
Last Resolved: 18 years ago18 years ago
Resolution: --- → INVALID

Comment 6

18 years ago
Duh - missed that syntactical nuance, Pierre.

However, specifying 'font:button' gives a font that is NOT my system-specified 
font (on Windows). There is still a problem here. I'll attach a testcase showing 
a bunch of buttons that have fonts specified using 'button', 'menu', 'dialog' - 
they all use the same font and it it not the correct one. If I get a chance I'll 
look into it more, unless you know what's wrong already.

Comment 7

18 years ago
Created attachment 9418 [details]
Testcase showing 'font:button' not mapping to correct font face on Windows
(Assignee)

Comment 8

18 years ago
With the default settings, CSS system fonts don't work on Windows because of bug 
22031 (see the comments from Erik on 2000-05-31 15:28).

Comment 9

18 years ago
Why is this marked INVALID?  Shouldn't it be DUPLICATE?  Reopening to set correct 
resolution...
Status: RESOLVED → REOPENED
Resolution: INVALID → ---

Comment 10

18 years ago
Pierre & Rod, I can't find info in the CSS Spec about "font:button;" in the 
following example found in the testcase Rod supplied:

<input type="button" style="font:button; font-size:12pt;" value="Button Button">

Could either|both you gentlemen vend me a clue or two?

Comment 11

18 years ago
Putting on [nsbeta2-] radar. Not critical to beta2. 
Whiteboard: [nsbeta2-]
(Assignee)

Comment 12

18 years ago
Chris, "font:button" is defined in
http://www.w3.org/TR/2000/WD-css3-userint-20000216#font. Specifying "font:button" 
should set simultaneously the font family, size and decorations.

The bug as originally described is invalid. If "font:button" wasn't working, it 
was because of bug 22031 which is fixed now. Note that for a full support, we 
also need to fix bug 33312.

Closed as Invalid again: we shouldn't need a special font when we can use the 
standard CSS2/CSS3 system fonts.
Status: REOPENED → RESOLVED
Last Resolved: 18 years ago18 years ago
Resolution: --- → INVALID

Comment 13

17 years ago
Marking VERIFIED INVALID per Pierre's comments.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.