1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef MOZILLA_GFX_SCALEDFONTWIN_H_
8 #define MOZILLA_GFX_SCALEDFONTWIN_H_
10 #include "ScaledFontBase.h"
16 class ScaledFontWin
: public ScaledFontBase
{
18 MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(ScaledFontWin
, override
)
19 ScaledFontWin(const LOGFONT
* aFont
, const RefPtr
<UnscaledFont
>& aUnscaledFont
,
22 FontType
GetType() const override
{ return FontType::GDI
; }
24 bool GetFontInstanceData(FontInstanceDataOutput aCb
, void* aBaton
) override
;
26 AntialiasMode
GetDefaultAAMode() override
;
28 SkTypeface
* CreateSkTypeface() override
;
30 bool MayUseBitmaps() override
{ return true; }
32 bool UseSubpixelPosition() const override
{ return false; }
35 cairo_font_face_t
* CreateCairoFontFace(
36 cairo_font_options_t
* aFontOptions
) override
;
39 friend class DrawTargetSkia
;
44 } // namespace mozilla
46 #endif /* MOZILLA_GFX_SCALEDFONTWIN_H_ */