Bug 1405148 - part 1 - Make gfxFontEntry::SupportsOpenTypeFeature a virtual method, and override on MacOS for AAT fonts that we'll shape with Core Text instead of HarfBuzz. r=jrmuizel

This commit is contained in:
Jonathan Kew 2017-10-11 22:12:42 +01:00
parent b5fd6b31a5
commit 2f7b2b13bf
2 changed files with 11 additions and 1 deletions

View File

@ -145,7 +145,7 @@ public:
// whether a feature is supported by the font (limited to a small set
// of features for which some form of fallback needs to be implemented)
bool SupportsOpenTypeFeature(Script aScript, uint32_t aFeatureTag);
virtual bool SupportsOpenTypeFeature(Script aScript, uint32_t aFeatureTag);
bool SupportsGraphiteFeature(uint32_t aFeatureTag);
// returns a set containing all input glyph ids for a given feature

View File

@ -69,6 +69,16 @@ public:
// the first time it is called.
bool HasTrackingTable();
bool SupportsOpenTypeFeature(Script aScript, uint32_t aFeatureTag) override
{
// If we're going to shape with Core Text, we don't support added
// OpenType features (aside from any CT applies by default).
if (RequiresAATLayout()) {
return false;
}
return gfxFontEntry::SupportsOpenTypeFeature(aScript, aFeatureTag);
}
// Return the tracking (in font units) to be applied for the given size.
// (This is a floating-point number because of possible interpolation.)
float TrackingForCSSPx(float aPointSize) const;