no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / gfx / 2d / UnscaledFontGDI.h
blob360111049192434432aafbdfcd904b5ff11c1022
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_UNSCALEDFONTGDI_H_
8 #define MOZILLA_GFX_UNSCALEDFONTGDI_H_
10 #include "2D.h"
11 #include <windows.h>
13 namespace mozilla {
14 namespace gfx {
16 class UnscaledFontGDI final : public UnscaledFont {
17 public:
18 MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(UnscaledFontGDI, override)
19 explicit UnscaledFontGDI(const LOGFONT& aLogFont) : mLogFont(aLogFont) {}
21 FontType GetType() const override { return FontType::GDI; }
23 const LOGFONT& GetLogFont() const { return mLogFont; }
25 bool GetFontFileData(FontFileDataOutput aDataCallback, void* aBaton) override;
27 bool GetFontDescriptor(FontDescriptorOutput aCb, void* aBaton) override;
29 bool GetFontInstanceData(FontInstanceDataOutput aCb, void* aBaton) override;
31 static already_AddRefed<UnscaledFont> CreateFromFontDescriptor(
32 const uint8_t* aData, uint32_t aDataLength, uint32_t aIndex);
34 already_AddRefed<ScaledFont> CreateScaledFont(
35 Float aGlyphSize, const uint8_t* aInstanceData,
36 uint32_t aInstanceDataLength, const FontVariation* aVariations,
37 uint32_t aNumVariations) override;
39 private:
40 LOGFONT mLogFont;
43 } // namespace gfx
44 } // namespace mozilla
46 #endif /* MOZILLA_GFX_UNSCALEDFONTGDI_H_ */