Closed Bug 1457103 Opened 2 years ago Closed 2 years ago

Implement missing variation-font query APIs in the Android (FT2Fonts) backend

Categories

(Core :: Graphics: Text, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

The FT2Fonts backend doesn't provide overrides for the (empty) default implementations of gfxFontEntry::HasVariations(), GetVariationAxes(), and GetVariationInstances(). This will (I believe) prevent the font inspector working fully for variation fonts when targetting Firefox on Android, even though the fonts work OK for rendering.
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Attachment #8971288 - Flags: review?(jwatt) → review+
Attachment #8971289 - Flags: review?(jwatt) → review+
Comment on attachment 8971290 [details] [diff] [review]
patch 3 - Make gfxFontEntry::GetVariationAxes and GetVariationInstances pure virtual, and provide missing subclass implementations

Review of attachment 8971290 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/thebes/gfxFontEntry.h
@@ +365,5 @@
>  
>      bool SupportsScriptInGSUB(const hb_tag_t* aScriptTags);
>  
> +    // For variation font support; font backends that don't support variations
> +    // should provide empty implementations.

Doxygen style while you're here, please.

@@ +370,2 @@
>      virtual bool HasVariations() = 0;
> +    

Remove white space on empty line.

@@ +370,5 @@
>      virtual bool HasVariations() = 0;
> +    
> +    virtual void
> +    GetVariationAxes(nsTArray<gfxFontVariationAxis>& aVariationAxes) = 0;
> +    

Remove white space on empty line.
Attachment #8971290 - Flags: review?(jwatt) → review+
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/46864f33859e
patch 1 - Make gfxFontEntry::HasVariations a pure-virtual method, and fill in missing subclass implementations, particularly in FT2FontEntry. r=jwatt
https://hg.mozilla.org/integration/mozilla-inbound/rev/c4e1dc66dae2
patch 2 - Refactor logic from gfxFontconfigFontEntry implementations of GetVariationAxes and GetVariationInstances to gfxFT2Utils, where it can be shared by the gfxFT2Fonts backend. r=jwatt
https://hg.mozilla.org/integration/mozilla-inbound/rev/f1c7ad9294b3
patch 3 - Make gfxFontEntry::GetVariationAxes and GetVariationInstances pure virtual, and provide missing subclass implementations. r=jwatt
You need to log in before you can comment on or make changes to this bug.