no bug - Import translations from android-l10n r=release a=l10n CLOSED TREE
[gecko.git] / gfx / 2d / ScaledFontWin.h
blob45ca23a3bb61a58e7acea150f928ca129abb07ad
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 SkTypeface* CreateSkTypeface() override;
30 bool MayUseBitmaps() override { return true; }
32 bool UseSubpixelPosition() const override { return false; }
34 protected:
35 cairo_font_face_t* CreateCairoFontFace(
36 cairo_font_options_t* aFontOptions) override;
38 private:
39 friend class DrawTargetSkia;
40 LOGFONT mLogFont;
43 } // namespace gfx
44 } // namespace mozilla
46 #endif /* MOZILLA_GFX_SCALEDFONTWIN_H_ */