Bug 1641886 [wpt PR 23851] - Support interpolating contain-intrinsic-size, a=testonly
[gecko.git] / gfx / 2d / ScaledFontWin.h
blob23fe85e78b714668a4969e45f665fd63e7816770
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"
11 #include <windows.h>
13 namespace mozilla {
14 namespace gfx {
16 class ScaledFontWin : public ScaledFontBase {
17 public:
18 MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(ScaledFontWin, override)
19 ScaledFontWin(const LOGFONT* aFont, const RefPtr<UnscaledFont>& aUnscaledFont,
20 Float aSize);
22 FontType GetType() const override { return FontType::GDI; }
24 bool GetFontInstanceData(FontInstanceDataOutput aCb, void* aBaton) override;
26 AntialiasMode GetDefaultAAMode() override;
28 #ifdef USE_SKIA
29 SkTypeface* CreateSkTypeface() override;
30 #endif
32 protected:
33 #ifdef USE_CAIRO_SCALED_FONT
34 cairo_font_face_t* CreateCairoFontFace(
35 cairo_font_options_t* aFontOptions) override;
36 #endif
38 private:
39 #ifdef USE_SKIA
40 friend class DrawTargetSkia;
41 #endif
42 LOGFONT mLogFont;
45 } // namespace gfx
46 } // namespace mozilla
48 #endif /* MOZILLA_GFX_SCALEDFONTWIN_H_ */