Closed
Bug 677900
Opened 13 years ago
Closed 6 years ago
allow multiple faces sharing the same style attributes within a font family
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: jfkthame, Assigned: jfkthame)
References
Details
Attachments
(1 file)
Currently, our code assumes that a given set of CSS font-* properties (weight, width, style) will uniquely identify a single face within a font family. In particular, we have gfxFontFamily::FindFontForStyle(), which returns a single face from the family. While this holds true in most common cases, there are several scenarios where a family may have several faces that match a given set of CSS properties. Generalizing the font-matching code so that we have gfxFontFamily::FindFontsForStyle() returning an array of matching faces will facilitate fixing a number of issues: - bug 465414 (should do glyph fallback across multiple @font-face rules defining the same font) - bug 465450 (a specific bug report that arises because of the above) - bug 475891 (unicode-range support, which is an enhancement of the above) - bug 469656 (support the OpenType optical size feature, if present) - bug 636042 (Samsung problem due to presence of subsetted fonts - worked around by using a whitelist of "preferred" standard fonts, but this would mitigate the issue in a general way) The attached patch provides support for multiple faces having the same style properties. This was tested on tryserver and does not appear to significantly impact performance; some platforms did show a small (<1%) regression, but others showed a comparable _improvement_.
Attachment #552074 -
Flags: review?(jdaggett)
Comment 1•12 years ago
|
||
Comment on attachment 552074 [details] [diff] [review] patch, support multiple font entries with the same style attributes within a family I'm minus'ing this because in the general case, having more than one font map to the same set of style characteristics is a bug. There's no great benefit to supporting this in the general case. Without support for the general case, this boils down to supporting unicode-range. I'd be fine if the patch only applies to @font-face rule defined faces, as a part of supporting unicode-range.
Attachment #552074 -
Flags: review?(jdaggett) → review-
Comment 2•11 years ago
|
||
So is support for 'unicode-range' happening here, or in bug 475891?
Comment 3•11 years ago
|
||
(In reply to Eric A. Meyer from comment #2) > So is support for 'unicode-range' happening here, or in bug 475891? In bug 475891.
Comment 4•11 years ago
|
||
Thanks, John!
Assignee | ||
Comment 5•6 years ago
|
||
Something much like this happened as part of unicode-range support, to the point where I think we can close this as WFM.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•