FontPlatformData::FontPlatformData(HFONT font, float size) : m_font(RefCountedHFONT::create(font)) , m_size(size) , m_scriptCache(0) , m_scriptFontProperties(0) , m_typeface(CreateTypefaceFromHFont(font, 0, &m_lfQuality)) { }
FontPlatformData::FontPlatformData(HFONT font, float size, FontOrientation orientation) : m_font(RefCountedHFONT::create(font)) , m_textSize(size) , m_fakeBold(false) , m_fakeItalic(false) , m_orientation(orientation) , m_scriptCache(0) , m_typeface(CreateTypefaceFromHFont(font, 0, &m_paintTextFlags)) , m_isHashTableDeletedValue(false) , m_useSubpixelPositioning(false) { }
void paintSkiaText(GraphicsContext* context, HFONT hfont, int numGlyphs, const WORD* glyphs, const int* advances, const GOFFSET* offsets, const SkPoint& origin, const SkRect& textRect) { int size; int paintTextFlags; RefPtr<SkTypeface> face = CreateTypefaceFromHFont(hfont, &size, &paintTextFlags); paintSkiaText(context, hfont, face.get(), size, paintTextFlags, numGlyphs, glyphs, advances, offsets, origin, textRect); }
void paintSkiaText(GraphicsContext* context, HFONT hfont, int numGlyphs, const WORD* glyphs, const int* advances, const GOFFSET* offsets, const SkPoint* origin) { int size; int quality; SkTypeface* face = CreateTypefaceFromHFont(hfont, &size, &quality); SkAutoUnref aur(face); paintSkiaText(context, hfont, face, size, quality, numGlyphs, glyphs, advances, offsets, origin); }