michael@0: /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "ScaledFontWin.h" michael@0: #include "ScaledFontBase.h" michael@0: michael@0: #ifdef USE_SKIA michael@0: #include "skia/SkTypeface_win.h" michael@0: #endif michael@0: michael@0: namespace mozilla { michael@0: namespace gfx { michael@0: michael@0: ScaledFontWin::ScaledFontWin(LOGFONT* aFont, Float aSize) michael@0: : ScaledFontBase(aSize) michael@0: , mLogFont(*aFont) michael@0: { michael@0: } michael@0: michael@0: #ifdef USE_SKIA michael@0: SkTypeface* ScaledFontWin::GetSkTypeface() michael@0: { michael@0: if (!mTypeface) { michael@0: mTypeface = SkCreateTypefaceFromLOGFONT(mLogFont); michael@0: } michael@0: return mTypeface; michael@0: } michael@0: #endif michael@0: michael@0: michael@0: } michael@0: }