mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-31 11:01:40 +00:00
Bug 791466 - Fix direct write cairo scaled font. r=Bas
This commit is contained in:
parent
dd87eaeb0b
commit
e3eb98c915
@ -485,7 +485,7 @@ gfxDWriteFont::GetSpaceGlyph()
|
||||
bool
|
||||
gfxDWriteFont::SetupCairoFont(gfxContext *aContext)
|
||||
{
|
||||
cairo_scaled_font_t *scaledFont = CairoScaledFont();
|
||||
cairo_scaled_font_t *scaledFont = GetCairoScaledFont();
|
||||
if (cairo_scaled_font_status(scaledFont) != CAIRO_STATUS_SUCCESS) {
|
||||
// Don't cairo_set_scaled_font as that would propagate the error to
|
||||
// the cairo_t, precluding any further drawing.
|
||||
@ -522,7 +522,7 @@ gfxDWriteFont::CairoFontFace()
|
||||
|
||||
|
||||
cairo_scaled_font_t *
|
||||
gfxDWriteFont::CairoScaledFont()
|
||||
gfxDWriteFont::GetCairoScaledFont()
|
||||
{
|
||||
if (!mScaledFont) {
|
||||
cairo_matrix_t sizeMatrix;
|
||||
@ -763,7 +763,7 @@ gfxDWriteFont::GetScaledFont(mozilla::gfx::DrawTarget *aTarget)
|
||||
if (wantCairo) {
|
||||
mAzureScaledFont = Factory::CreateScaledFontWithCairo(nativeFont,
|
||||
GetAdjustedSize(),
|
||||
CairoScaledFont());
|
||||
GetCairoScaledFont());
|
||||
} else {
|
||||
mAzureScaledFont = Factory::CreateScaledFontForNativeFont(nativeFont,
|
||||
GetAdjustedSize());
|
||||
|
@ -71,6 +71,8 @@ public:
|
||||
|
||||
virtual mozilla::TemporaryRef<mozilla::gfx::ScaledFont> GetScaledFont(mozilla::gfx::DrawTarget *aTarget);
|
||||
|
||||
virtual cairo_scaled_font_t *GetCairoScaledFont();
|
||||
|
||||
protected:
|
||||
friend class gfxDWriteShaper;
|
||||
|
||||
@ -84,8 +86,6 @@ protected:
|
||||
|
||||
cairo_font_face_t *CairoFontFace();
|
||||
|
||||
cairo_scaled_font_t *CairoScaledFont();
|
||||
|
||||
gfxFloat MeasureGlyphWidth(uint16_t aGlyph);
|
||||
|
||||
static void DestroyBlobFunc(void* userArg);
|
||||
|
@ -1262,7 +1262,7 @@ public:
|
||||
const nsString& GetName() const { return mFontEntry->Name(); }
|
||||
const gfxFontStyle *GetStyle() const { return &mStyle; }
|
||||
|
||||
cairo_scaled_font_t* GetCairoScaledFont() { return mScaledFont; }
|
||||
virtual cairo_scaled_font_t* GetCairoScaledFont() { return mScaledFont; }
|
||||
|
||||
virtual gfxFont* CopyWithAntialiasOption(AntialiasOption anAAOption) {
|
||||
// platforms where this actually matters should override
|
||||
|
Loading…
x
Reference in New Issue
Block a user