Open Bug 1576820 Opened 5 years ago Updated 4 months ago

CSS @font-face family is not rendered in select option

Categories

(Core :: Layout: Form Controls, defect, P3)

68 Branch
defect

Tracking

()

Tracking Status
firefox68 --- affected
firefox69 --- affected
firefox70 --- affected

People

(Reporter: samuelberisha, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Attached image select-opened.png β€”

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36

Steps to reproduce:

  1. Create a simple HTML select
  2. Give it a font-family with css.

This Bug happened on my mac with macOS Mojave (10.14.5) installed

Actual results:

The select has the right font-family, but if you open the select, the options have the wrong font.

Expected results:

If you open the select, the options should have the same font as the select.

Attached file test.html β€”
Attached image font.png β€”

Hi,
I managed to reproduce this issue on Mac 10.14.5 and Windows 10 with Firefox Release 68, Nightly 70. I used "test.html" to test this and the font displayed is not the right one(please see attached screenshot)

Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core
Status: UNCONFIRMED → NEW
Ever confirmed: true

Verdana is not a font installed on Mac, so you're falling back to the next font, and I think this is working as expected.

Reporter, is this about @font-face fonts? if so, that's expected because we render the <select> popup in a different process.

Flags: needinfo?(samuelberisha)

Yes it is about @font-face fonts. Why is that the expected behaviour? For example, if I give my select the "Roboto" font, which I imported from Google fonts, I want the option fields in the same font. Chrome and Safari seem to do it right.

Flags: needinfo?(samuelberisha)

I meant that the behavior is expected given our current implementation, I still think it's something worth fixing.

FWIW, when I tested this in the past, WebKit didn't seem to do this right either. Maybe they fixed it, or maybe there are multiple code paths involved there, dunno.

Component: CSS Parsing and Computation → Layout: Form Controls
Summary: CSS font-family is not rendered in select option → CSS @font-face family is not rendered in select option
Priority: -- → P3
Severity: normal → S3

Hi, Will this ever be done? Currently it seems that the only workaround is to use Chrome and not bother with firefox.. which is a pretty crap workaround :(

(In reply to Antix Development from comment #9)

Hi, Will this ever be done? Currently it seems that the only workaround is to use Chrome and not bother with firefox.. which is a pretty crap workaround :(

This workaround has always worked well for me

Duplicate of this bug: 1810247
Duplicate of this bug: 1819489

Live reproduction of the problem.

Hello,

Will this problem ever be solved? Custom fonts are very common today, how come in 2024 this problem is still with us? It's quite absurd.

We and our customers have the same problem with Firefox on Windows 11: when the drop-down menu is opened and a custom font is used on the SELECT (Roboto, Proxima Nova...), the font is not used and Firefox automatically uses the next font specified in the css styles (serif and sans-serif work, for example). It seems that only system fonts can be used.

We tried several sites with Firefox on several Windows computers, and the problem occurred every time, even with different fonts. We believe this problem potentially affects all Firefox users on Windows.

A simple visit to https://rgelb.github.io/ffsample/index.html (with Firefox and Windows) demonstrates the problem!
This link was provided by Raluca Popovici 5 years ago (!!).

Please fix it.... !

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: