Closed Bug 1031187 Opened 10 years ago Closed 10 years ago

set family name on font entries more eagerly

Categories

(Core :: Graphics: Text, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: heycam, Assigned: heycam)

References

Details

Attachments

(2 files)

In bug 1028497 we will need to be able to create gfxProxyFontEntry objects (and resolve them to real font entries) that haven't been added to a gfx{Mixed,}FontFamily.  Currently mFontFamily on the entry is set only once the entry is added to the font family.  For the font entry objects created outside the user font set to go in the user font cache, they need to have their mFamilyName set.  This patch sets it as soon as we create a gfxProxyFontEntry and also once we resolve the gfxProxyFontEntry to an actual font entry.  There are some situations where we don't have the font family name to store on the font entry -- such as in gfxMacFontFamily::FindStyleVariations -- so I've made gfx{Mixed,}FontFamily::AddFontEntry set the family name if it hasn't been set yet, and if it has been set already, assert that it's the same as the name on the family object.
Assignee: nobody → cam
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: x86_64 → All
Now that we have a valid mFamilyName on all gfxProxyFontEntry objects, let's use it rather than the name from the gfxMixedFontFamily object when logging.  In bug 1028497, gfxProxyFontEntry objects created without being added to the user font set won't have a gfxMixedFontFamily passed in to the logging functions, so this will make the family name come out in the logs.
Attachment #8447017 - Flags: review?(jdaggett)
This depends on the part 1 refactoring in bug 754215.
Depends on: 754215
Attachment #8447016 - Flags: review?(jdaggett) → review+
Attachment #8447017 - Flags: review?(jdaggett) → review+
https://hg.mozilla.org/mozilla-central/rev/9ec5db6a1684
https://hg.mozilla.org/mozilla-central/rev/df4473d66d38
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Depends on: 1037442
(In reply to Carsten Book [:Tomcat] from comment #7)
> https://hg.mozilla.org/mozilla-central/rev/9ec5db6a1684
> https://hg.mozilla.org/mozilla-central/rev/df4473d66d38

I verified that backing out these two changesets locally fixes bug 1037442 for me.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: