1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef gfxMacPlatformFontList_H_
7 #define gfxMacPlatformFontList_H_
9 #include <CoreFoundation/CoreFoundation.h>
11 #include "CoreTextFontList.h"
13 class gfxMacPlatformFontList final
: public CoreTextFontList
{
15 static gfxMacPlatformFontList
* PlatformFontList() {
16 return static_cast<gfxMacPlatformFontList
*>(
17 gfxPlatformFontList::PlatformFontList());
20 void LookupSystemFont(mozilla::LookAndFeel::FontID aSystemFontID
,
21 nsACString
& aSystemFontName
, gfxFontStyle
& aFontStyle
);
24 bool DeprecatedFamilyIsAvailable(const nsACString
& aName
) override
;
25 FontVisibility
GetVisibilityForFamily(const nsACString
& aName
) const override
;
27 FontFamily
GetDefaultFontForPlatform(nsPresContext
* aPresContext
,
28 const gfxFontStyle
* aStyle
,
29 nsAtom
* aLanguage
= nullptr)
30 MOZ_REQUIRES(mLock
) override
;
33 friend class gfxPlatformMac
;
35 gfxMacPlatformFontList();
36 virtual ~gfxMacPlatformFontList() = default;
38 // Special-case font faces treated as font families (set via prefs)
39 void InitSingleFaceList() MOZ_REQUIRES(mLock
) override
;
40 void InitAliasesForSingleFaceList() MOZ_REQUIRES(mLock
) override
;
42 // initialize system fonts
43 void InitSystemFontNames() override
MOZ_REQUIRES(mLock
);
45 nsTArray
<nsCString
> mSingleFaceFonts
;
48 #endif /* gfxMacPlatformFontList_H_ */