Closed Bug 1110052 Opened 11 years ago Closed 11 years ago

font-face fails if font name includes whitespace within its name

Categories

(Core :: General, defect)

34 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: pragyathelogic, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0 Build ID: 20141126041045 Steps to reproduce: 1. Create a html page with font face given as "Arial" i.e. <font face="Arial">Example</font> 2. Change font face to "Arial Rounded TM Bold" i.e. <font face="Arial Rounded TM Bold">Example</font> 3. Change font face to "Kruti Dev 010" i.e. <font face="Kruti Dev 010">Example</font> Actual results: 1. working fine, Showing Data in Arial Font 2. no effect, Showing Data in Default Browser Font i.e. Arial 3. no effect, Showing Data in Default Browser Font i.e. Arial Expected results: 1. Should show Data in 'Arial' Font as browser support 'Arial' font 2. Should show Data in "Arial Rounded TM Bold" Font as browser support "Arial Rounded TM Bold" font 3. Should show Data in "Kruti Dev 010" Font as browser support "Kruti Dev 010" font
Component: Untriaged → Graphics: Text
Product: Firefox → Core
Can you provide a testcase? I can't reproduce with e.g.: http://jsbin.com/giposorugo/1/edit That shows Arial Black as expected. (moving back to core::untriaged, because I'm not sure what's going wrong here)
Component: Graphics: Text → Untriaged
Flags: needinfo?(pragyathelogic)
Keywords: testcase-wanted
(In reply to Gijs Kruitbosch from comment #1) > (moving back to core::untriaged, because I'm not sure what's going wrong > here) (more specifically, this could be a bug in the CSS parsing, in HTMLFontElement itself, or in the actual picking of fonts, in which case Graphics: Text is involved)
(In reply to Pragya Sharma from comment #0) > 1. Create a html page with font face given as "Arial" i.e. <font > face="Arial">Example</font> > 2. Change font face to "Arial Rounded TM Bold" i.e. <font face="Arial > Rounded TM Bold">Example</font> > 3. Change font face to "Kruti Dev 010" i.e. <font face="Kruti Dev > 010">Example</font> (2) looks like a typo; I'd expect the font face name to be "Arial Rounded MT Bold". If (3) refers to the "Kruti Dev 010" font that I found via a web search, e.g. http://hindi-fonts.com/fonts/Kruti-Dev-010, this appears to be an extremely old, non-Unicode-compliant font, with errors in some of the font data tables. I haven't tried to determine exactly why it fails, but I'm not surprised if it proves to be incompatible with current software. I'd suggest getting rid of it and using Unicode-compliant fonts.
This most likely should be marked invalid. Spaces in font family names are allowed, either quoted or unquoted, and will be parsed correctly according to the rules of CSS specs that define font family name parsing. Gijs, using 'Arial Black' is a poor choice for historical reasons. It's not a font family name under DirectWrite (the black face is grouped as another face of Arial). "Times New Roman" would be a better testcase name to use.
Closing per comment #4 and comment #5. (In reply to John Daggett (:jtd) from comment #4) > Gijs, using 'Arial Black' is a poor choice for historical reasons. It's not > a font family name under DirectWrite (the black face is grouped as another > face of Arial). "Times New Roman" would be a better testcase name to use. Good to know, thanks for the educational snippet! :-)
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Flags: needinfo?(pragyathelogic)
Resolution: --- → INVALID
Moving from Core::Untriaged to Core::General https://bugzilla.mozilla.org/show_bug.cgi?id=1407598
Component: Untriaged → General
You need to log in before you can comment on or make changes to this bug.