gfxMacPlatformFontList.h (1508B)
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/. */ 5 6 #ifndef gfxMacPlatformFontList_H_ 7 #define gfxMacPlatformFontList_H_ 8 9 #include <CoreFoundation/CoreFoundation.h> 10 11 #include "CoreTextFontList.h" 12 13 class gfxMacPlatformFontList final : public CoreTextFontList { 14 public: 15 static gfxMacPlatformFontList* PlatformFontList() { 16 return static_cast<gfxMacPlatformFontList*>( 17 gfxPlatformFontList::PlatformFontList()); 18 } 19 20 nsTArray<std::pair<const char**, uint32_t>> GetFilteredPlatformFontLists() 21 override; 22 23 static void LookupSystemFont(mozilla::LookAndFeel::FontID aSystemFontID, 24 nsACString& aSystemFontName, 25 gfxFontStyle& aFontStyle); 26 27 protected: 28 bool DeprecatedFamilyIsAvailable(const nsACString& aName) override; 29 FontVisibility GetVisibilityForFamily(const nsACString& aName) const override; 30 31 private: 32 friend class gfxPlatformMac; 33 34 gfxMacPlatformFontList(); 35 virtual ~gfxMacPlatformFontList() = default; 36 37 // Special-case font faces treated as font families (set via prefs) 38 void InitSingleFaceList() MOZ_REQUIRES(mLock) override; 39 void InitAliasesForSingleFaceList() MOZ_REQUIRES(mLock) override; 40 41 nsTArray<nsCString> mSingleFaceFonts; 42 }; 43 44 #endif /* gfxMacPlatformFontList_H_ */