Closed Bug 1224607 Opened 9 years ago Closed 9 years ago

font-stretch not working

Categories

(Firefox for Android Graveyard :: General, defect)

42 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: aluton, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36 Steps to reproduce: font-stretch does not appear to be working with condensed or expanded options in Firefox for Android Desktop Firefox is fine Actual results: The 'normal' font is displayed, irrespective of the font-stretch setting Expected results: If available, an alternative font should be displayed, typically occupying a different width
I can confirm the behavior on an Android device. This depends on the installed fonts on the system. "If the font has no condensed or expanded faces, like the default "Times New Roman" on Mac OS, font-stretch will not have any visible effect as the only suitable face will be used in all cases." - https://developer.mozilla.org/en-US/docs/Web/CSS/font-stretch The fonts on my device are at http://people.mozilla.org/~kbrosnan/tmp/1224607/nexus-5x-fonts/ David or Jonathan is this a valid bug?
Flags: needinfo?(jfkthame)
Flags: needinfo?(dbaron)
Flags: needinfo?(dbaron) → needinfo?(jdaggett)
(In reply to Alex from comment #0) > Expected results: > > If available, an alternative font should be displayed, typically occupying a > different width The font-stretch property picks a condensed or expanded face if it exists *within* the family you've chosen. It doesn't not automagically synthesize an effect if a condensed/expanded face does not exist. So this bug is invalid unless there's a family that contains condensed/expanded fonts for which the expended condensed/expanded fonts are not displayed when specifying that family with font-stretch set to something other than 'normal'.
Flags: needinfo?(jdaggett)
For a full description of how font-stretch affects font selection, see the spec for font style matching: http://www.w3.org/TR/css3-fonts/#font-style-matching
(In reply to Kevin Brosnan [:kbrosnan] from comment #1) > Created attachment 8688738 [details] > font-stretch-testcase.html > > I can confirm the behavior on an Android device. > > This depends on the installed fonts on the system. "If the font has no > condensed or expanded faces, like the default "Times New Roman" on Mac OS, > font-stretch will not have any visible effect as the only suitable face will > be used in all cases." - > https://developer.mozilla.org/en-US/docs/Web/CSS/font-stretch > > The fonts on my device are at > http://people.mozilla.org/~kbrosnan/tmp/1224607/nexus-5x-fonts/ > > David or Jonathan is this a valid bug? I don't think so; there aren't any expanded or condensed faces available in the default font families on typical android devices, so font-stretch will have no effect, as described above. (Note that even the RobotoCondensed-* fonts on your Nexus aren't relevant here, because they are not configured as part of the Roboto family; they're a separate "Roboto Condensed" family.) Given that very few systems have condensed and expanded faces in their standard font families, in practice I think font-stretch is more likely to be useful in conjunction with @font-face.
Flags: needinfo?(jfkthame)
I've just tested Roboto on Firefox (Windows) and the Android bundled fonts seem to be associated ok with the Roboto family, including Roboto Condensed. I've also tested with a different (commercial license) font, to the same effect. Desktop Firefox will display these fonts under the same font-family, and vary based on the font-stretch. Firefox for Android ignores font-stretch and displays the standard font
Family groupings are different per platform, as odd as that may seem. DirectWrite will group fonts into a large family but GDI will not. Are the versions of Roboto you're using on the desktop the same as the ones on the version of Android you're using? *If* there is a problem, I'm guessing it's in how families are arranged, not in the use of font-stretch as a selection attribute. Which version of Android are you using? By commercial font you mean something like Minion Pro, a large family which includes condensed faces?
(In reply to John Daggett (:jtd) from comment #6) > Family groupings are different per platform, as odd as that may seem. > DirectWrite will group fonts into a large family but GDI will not. Are the > versions of Roboto you're using on the desktop the same as the ones on the > version of Android you're using? Indeed, is your Android test using Roboto at all? IIRC, Firefox for Android bundles the Open Sans fonts in its package, and uses these as the default family, so you'd need to explicitly say "font-family:Roboto" to test with the installed Roboto fonts.
Interesting, thanks. I think you're right as my Linux desktop also seems unable to group them. I copied the Roboto fonts direct from my Android 4.4.2 device. The other font in question is ITC Avant Garde Std. So this is probably typically overlooked by font creators as it appears to work on Windows :(
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: