mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1328337 - fix implicit conversion of glyph size from float to uint32_t in NativeFontResource::CreateScaledFont. r=bobowen
MozReview-Commit-ID: 9JcrfRYJ3ca
This commit is contained in:
parent
93fd0a00c1
commit
37e1e73a58
@ -741,7 +741,7 @@ public:
|
||||
* @return an already_addrefed ScaledFont, containing nullptr if failed.
|
||||
*/
|
||||
virtual already_AddRefed<ScaledFont>
|
||||
CreateScaledFont(uint32_t aIndex, uint32_t aGlyphSize) = 0;
|
||||
CreateScaledFont(uint32_t aIndex, Float aGlyphSize) = 0;
|
||||
|
||||
virtual ~NativeFontResource() {};
|
||||
};
|
||||
|
@ -259,7 +259,7 @@ NativeFontResourceDWrite::Create(uint8_t *aFontData, uint32_t aDataLength,
|
||||
}
|
||||
|
||||
already_AddRefed<ScaledFont>
|
||||
NativeFontResourceDWrite::CreateScaledFont(uint32_t aIndex, uint32_t aGlyphSize)
|
||||
NativeFontResourceDWrite::CreateScaledFont(uint32_t aIndex, Float aGlyphSize)
|
||||
{
|
||||
if (aIndex >= mNumberOfFaces) {
|
||||
gfxWarning() << "Font face index is too high for font resource.";
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
Create(uint8_t *aFontData, uint32_t aDataLength, bool aNeedsCairo);
|
||||
|
||||
already_AddRefed<ScaledFont>
|
||||
CreateScaledFont(uint32_t aIndex, uint32_t aGlyphSize) final;
|
||||
CreateScaledFont(uint32_t aIndex, Float aGlyphSize) final;
|
||||
|
||||
private:
|
||||
NativeFontResourceDWrite(IDWriteFactory *aFactory,
|
||||
|
@ -65,7 +65,7 @@ NativeFontResourceGDI::~NativeFontResourceGDI()
|
||||
}
|
||||
|
||||
already_AddRefed<ScaledFont>
|
||||
NativeFontResourceGDI::CreateScaledFont(uint32_t aIndex, uint32_t aGlyphSize)
|
||||
NativeFontResourceGDI::CreateScaledFont(uint32_t aIndex, Float aGlyphSize)
|
||||
{
|
||||
if (aIndex >= mFontNames.length()) {
|
||||
gfxWarning() << "Font index is too high for font resource.";
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
~NativeFontResourceGDI();
|
||||
|
||||
already_AddRefed<ScaledFont>
|
||||
CreateScaledFont(uint32_t aIndex, uint32_t aGlyphSize) final;
|
||||
CreateScaledFont(uint32_t aIndex, Float aGlyphSize) final;
|
||||
|
||||
private:
|
||||
NativeFontResourceGDI(HANDLE aFontResourceHandle,
|
||||
|
@ -50,7 +50,7 @@ NativeFontResourceMac::Create(uint8_t *aFontData, uint32_t aDataLength)
|
||||
}
|
||||
|
||||
already_AddRefed<ScaledFont>
|
||||
NativeFontResourceMac::CreateScaledFont(uint32_t aIndex, uint32_t aGlyphSize)
|
||||
NativeFontResourceMac::CreateScaledFont(uint32_t aIndex, Float aGlyphSize)
|
||||
{
|
||||
RefPtr<ScaledFontBase> scaledFont = new ScaledFontMac(mFontRef, aGlyphSize);
|
||||
|
||||
|
@ -23,7 +23,7 @@ public:
|
||||
Create(uint8_t *aFontData, uint32_t aDataLength);
|
||||
|
||||
already_AddRefed<ScaledFont>
|
||||
CreateScaledFont(uint32_t aIndex, uint32_t aGlyphSize);
|
||||
CreateScaledFont(uint32_t aIndex, Float aGlyphSize);
|
||||
|
||||
~NativeFontResourceMac()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user