2009-08-16 17:52:12 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
2012-05-21 15:12:37 +04:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2009-08-16 17:52:12 +04:00
|
|
|
|
|
|
|
#ifndef GFXPLATFORMFONTLIST_H_
|
|
|
|
#define GFXPLATFORMFONTLIST_H_
|
|
|
|
|
|
|
|
#include "nsDataHashtable.h"
|
|
|
|
#include "nsRefPtrHashtable.h"
|
2011-11-09 00:22:04 +04:00
|
|
|
#include "nsTHashtable.h"
|
2009-08-16 17:52:12 +04:00
|
|
|
|
|
|
|
#include "gfxFontUtils.h"
|
2014-01-29 11:39:01 +04:00
|
|
|
#include "gfxFontInfoLoader.h"
|
2009-08-16 17:52:12 +04:00
|
|
|
#include "gfxFont.h"
|
|
|
|
#include "gfxPlatform.h"
|
|
|
|
|
2012-03-28 01:38:39 +04:00
|
|
|
#include "nsIMemoryReporter.h"
|
2012-06-13 08:14:28 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2013-06-23 16:03:39 +04:00
|
|
|
#include "mozilla/MemoryReporting.h"
|
2010-05-20 03:22:19 +04:00
|
|
|
|
2012-04-19 03:59:43 +04:00
|
|
|
class CharMapHashKey : public PLDHashEntryHdr
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
typedef gfxCharacterMap* KeyType;
|
|
|
|
typedef const gfxCharacterMap* KeyTypePointer;
|
|
|
|
|
2014-08-08 05:17:30 +04:00
|
|
|
explicit CharMapHashKey(const gfxCharacterMap *aCharMap) :
|
2012-04-19 03:59:43 +04:00
|
|
|
mCharMap(const_cast<gfxCharacterMap*>(aCharMap))
|
|
|
|
{
|
|
|
|
MOZ_COUNT_CTOR(CharMapHashKey);
|
|
|
|
}
|
|
|
|
CharMapHashKey(const CharMapHashKey& toCopy) :
|
|
|
|
mCharMap(toCopy.mCharMap)
|
|
|
|
{
|
|
|
|
MOZ_COUNT_CTOR(CharMapHashKey);
|
|
|
|
}
|
|
|
|
~CharMapHashKey()
|
|
|
|
{
|
|
|
|
MOZ_COUNT_DTOR(CharMapHashKey);
|
|
|
|
}
|
|
|
|
|
|
|
|
gfxCharacterMap* GetKey() const { return mCharMap; }
|
|
|
|
|
|
|
|
bool KeyEquals(const gfxCharacterMap *aCharMap) const {
|
|
|
|
NS_ASSERTION(!aCharMap->mBuildOnTheFly && !mCharMap->mBuildOnTheFly,
|
|
|
|
"custom cmap used in shared cmap hashtable");
|
|
|
|
// cmaps built on the fly never match
|
|
|
|
if (aCharMap->mHash != mCharMap->mHash)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return mCharMap->Equals(aCharMap);
|
|
|
|
}
|
|
|
|
|
|
|
|
static const gfxCharacterMap* KeyToPointer(gfxCharacterMap *aCharMap) {
|
|
|
|
return aCharMap;
|
|
|
|
}
|
|
|
|
static PLDHashNumber HashKey(const gfxCharacterMap *aCharMap) {
|
|
|
|
return aCharMap->mHash;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum { ALLOW_MEMMOVE = true };
|
|
|
|
|
|
|
|
protected:
|
|
|
|
gfxCharacterMap *mCharMap;
|
|
|
|
};
|
|
|
|
|
2009-08-16 17:52:12 +04:00
|
|
|
// gfxPlatformFontList is an abstract class for the global font list on the system;
|
|
|
|
// concrete subclasses for each platform implement the actual interface to the system fonts.
|
|
|
|
// This class exists because we cannot rely on the platform font-finding APIs to behave
|
|
|
|
// in sensible/similar ways, particularly with rich, complex OpenType families,
|
|
|
|
// so we do our own font family/style management here instead.
|
|
|
|
|
|
|
|
// Much of this is based on the old gfxQuartzFontCache, but adapted for use on all platforms.
|
|
|
|
|
2012-03-28 01:38:39 +04:00
|
|
|
struct FontListSizes {
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t mFontListSize; // size of the font list and dependent objects
|
2012-03-28 01:38:39 +04:00
|
|
|
// (font family and face names, etc), but NOT
|
|
|
|
// including the font table cache and the cmaps
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t mFontTableCacheSize; // memory used for the gfxFontEntry table caches
|
|
|
|
uint32_t mCharMapsSize; // memory used for cmap coverage info
|
2012-03-28 01:38:39 +04:00
|
|
|
};
|
|
|
|
|
2014-04-17 18:17:22 +04:00
|
|
|
class gfxUserFontSet;
|
|
|
|
|
2014-01-29 11:39:01 +04:00
|
|
|
class gfxPlatformFontList : public gfxFontInfoLoader
|
2009-08-16 17:52:12 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
static gfxPlatformFontList* PlatformFontList() {
|
|
|
|
return sPlatformFontList;
|
|
|
|
}
|
|
|
|
|
|
|
|
static nsresult Init() {
|
|
|
|
NS_ASSERTION(!sPlatformFontList, "What's this doing here?");
|
2010-11-08 14:02:27 +03:00
|
|
|
gfxPlatform::GetPlatform()->CreatePlatformFontList();
|
|
|
|
if (!sPlatformFontList) {
|
|
|
|
return NS_ERROR_OUT_OF_MEMORY;
|
|
|
|
}
|
2009-08-16 17:52:12 +04:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void Shutdown() {
|
|
|
|
delete sPlatformFontList;
|
2012-07-30 18:20:58 +04:00
|
|
|
sPlatformFontList = nullptr;
|
2009-08-16 17:52:12 +04:00
|
|
|
}
|
|
|
|
|
2011-06-12 06:30:16 +04:00
|
|
|
virtual ~gfxPlatformFontList();
|
|
|
|
|
2010-11-08 14:02:27 +03:00
|
|
|
// initialize font lists
|
|
|
|
virtual nsresult InitFontList();
|
|
|
|
|
2015-05-13 08:11:25 +03:00
|
|
|
virtual void GetFontList(nsIAtom *aLangGroup,
|
|
|
|
const nsACString& aGenericFamily,
|
|
|
|
nsTArray<nsString>& aListOfFonts);
|
2009-08-16 17:52:12 +04:00
|
|
|
|
2014-04-17 18:17:22 +04:00
|
|
|
void UpdateFontList();
|
2009-08-16 17:52:12 +04:00
|
|
|
|
|
|
|
void ClearPrefFonts() { mPrefFonts.Clear(); }
|
|
|
|
|
2011-04-13 11:28:34 +04:00
|
|
|
virtual void GetFontFamilyList(nsTArray<nsRefPtr<gfxFontFamily> >& aFamilyArray);
|
2009-08-16 17:52:12 +04:00
|
|
|
|
2014-09-30 10:27:55 +04:00
|
|
|
gfxFontEntry*
|
|
|
|
SystemFindFontForChar(uint32_t aCh, uint32_t aNextCh,
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t aRunScript,
|
2012-03-09 06:05:24 +04:00
|
|
|
const gfxFontStyle* aStyle);
|
2009-08-16 17:52:12 +04:00
|
|
|
|
2014-08-19 16:46:17 +04:00
|
|
|
virtual gfxFontFamily* FindFamily(const nsAString& aFamily,
|
2015-05-13 08:11:25 +03:00
|
|
|
nsIAtom* aLanguage = nullptr,
|
2014-08-19 16:46:17 +04:00
|
|
|
bool aUseSystemFonts = false);
|
2009-08-16 17:52:12 +04:00
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
gfxFontEntry* FindFontForFamily(const nsAString& aFamily, const gfxFontStyle* aStyle, bool& aNeedsBold);
|
2009-08-16 17:52:12 +04:00
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
bool GetPrefFontFamilyEntries(eFontPrefLang aLangGroup, nsTArray<nsRefPtr<gfxFontFamily> > *array);
|
2009-08-16 17:52:12 +04:00
|
|
|
void SetPrefFontFamilyEntries(eFontPrefLang aLangGroup, nsTArray<nsRefPtr<gfxFontFamily> >& array);
|
|
|
|
|
2010-01-29 04:41:25 +03:00
|
|
|
// name lookup table methods
|
|
|
|
|
2009-08-16 17:52:12 +04:00
|
|
|
void AddOtherFamilyName(gfxFontFamily *aFamilyEntry, nsAString& aOtherFamilyName);
|
|
|
|
|
2010-01-29 04:41:25 +03:00
|
|
|
void AddFullname(gfxFontEntry *aFontEntry, nsAString& aFullname);
|
|
|
|
|
|
|
|
void AddPostscriptName(gfxFontEntry *aFontEntry, nsAString& aPostscriptName);
|
|
|
|
|
2013-09-02 12:41:57 +04:00
|
|
|
bool NeedFullnamePostscriptNames() { return mExtraNames != nullptr; }
|
2010-01-29 04:41:25 +03:00
|
|
|
|
2009-08-16 17:52:12 +04:00
|
|
|
// pure virtual functions, to be provided by concrete subclasses
|
|
|
|
|
2012-12-19 13:42:25 +04:00
|
|
|
// get the system default font family
|
|
|
|
virtual gfxFontFamily* GetDefaultFont(const gfxFontStyle* aStyle) = 0;
|
2009-08-16 17:52:12 +04:00
|
|
|
|
|
|
|
// look up a font by name on the host platform
|
2014-09-08 11:23:19 +04:00
|
|
|
virtual gfxFontEntry* LookupLocalFont(const nsAString& aFontName,
|
|
|
|
uint16_t aWeight,
|
|
|
|
int16_t aStretch,
|
|
|
|
bool aItalic) = 0;
|
2009-08-16 17:52:12 +04:00
|
|
|
|
|
|
|
// create a new platform font from downloaded data (@font-face)
|
2015-04-01 08:29:55 +03:00
|
|
|
// this method is responsible to ensure aFontData is free()'d
|
2014-09-08 11:23:19 +04:00
|
|
|
virtual gfxFontEntry* MakePlatformFont(const nsAString& aFontName,
|
|
|
|
uint16_t aWeight,
|
|
|
|
int16_t aStretch,
|
|
|
|
bool aItalic,
|
|
|
|
const uint8_t* aFontData,
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t aLength) = 0;
|
2009-08-16 17:52:12 +04:00
|
|
|
|
|
|
|
// get the standard family name on the platform for a given font name
|
2009-10-07 18:13:40 +04:00
|
|
|
// (platforms may override, eg Mac)
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual bool GetStandardFamilyName(const nsAString& aFontName, nsAString& aFamilyName);
|
2009-08-16 17:52:12 +04:00
|
|
|
|
2013-10-15 06:19:47 +04:00
|
|
|
virtual void AddSizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf,
|
|
|
|
FontListSizes* aSizes) const;
|
|
|
|
virtual void AddSizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
|
|
|
|
FontListSizes* aSizes) const;
|
2012-03-28 01:38:39 +04:00
|
|
|
|
2012-04-19 03:59:43 +04:00
|
|
|
// search for existing cmap that matches the input
|
|
|
|
// return the input if no match is found
|
|
|
|
gfxCharacterMap* FindCharMap(gfxCharacterMap *aCmap);
|
|
|
|
|
|
|
|
// add a cmap to the shared cmap set
|
|
|
|
gfxCharacterMap* AddCmap(const gfxCharacterMap *aCharMap);
|
|
|
|
|
|
|
|
// remove the cmap from the shared cmap set
|
|
|
|
void RemoveCmap(const gfxCharacterMap *aCharMap);
|
|
|
|
|
2014-04-17 18:17:22 +04:00
|
|
|
// keep track of userfont sets to notify when global fontlist changes occur
|
|
|
|
void AddUserFontSet(gfxUserFontSet *aUserFontSet) {
|
|
|
|
mUserFontSetList.PutEntry(aUserFontSet);
|
|
|
|
}
|
|
|
|
|
|
|
|
void RemoveUserFontSet(gfxUserFontSet *aUserFontSet) {
|
|
|
|
mUserFontSetList.RemoveEntry(aUserFontSet);
|
|
|
|
}
|
|
|
|
|
2014-05-05 22:59:55 +04:00
|
|
|
static const gfxFontEntry::ScriptRange sComplexScriptRanges[];
|
|
|
|
|
2009-08-16 17:52:12 +04:00
|
|
|
protected:
|
2015-03-21 19:28:04 +03:00
|
|
|
class MemoryReporter final : public nsIMemoryReporter
|
2012-03-28 01:38:39 +04:00
|
|
|
{
|
2014-06-23 22:49:07 +04:00
|
|
|
~MemoryReporter() {}
|
2012-03-28 01:38:39 +04:00
|
|
|
public:
|
2013-12-08 09:39:47 +04:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIMEMORYREPORTER
|
2012-03-28 01:38:39 +04:00
|
|
|
};
|
|
|
|
|
2014-08-08 05:17:30 +04:00
|
|
|
explicit gfxPlatformFontList(bool aNeedFullnamePostscriptNames = true);
|
2009-08-16 17:52:12 +04:00
|
|
|
|
|
|
|
static gfxPlatformFontList *sPlatformFontList;
|
|
|
|
|
|
|
|
static PLDHashOperator FindFontForCharProc(nsStringHashKey::KeyType aKey,
|
|
|
|
nsRefPtr<gfxFontFamily>& aFamilyEntry,
|
|
|
|
void* userArg);
|
|
|
|
|
2015-05-13 08:11:25 +03:00
|
|
|
// Lookup family name in global family list without substitutions or
|
|
|
|
// localized family name lookup. Used for common font fallback families.
|
|
|
|
gfxFontFamily* FindFamilyByCanonicalName(const nsAString& aFamily) {
|
|
|
|
nsAutoString key;
|
|
|
|
gfxFontFamily *familyEntry;
|
|
|
|
GenerateFontListKey(aFamily, key);
|
|
|
|
if ((familyEntry = mFontFamilies.GetWeak(key))) {
|
|
|
|
return CheckFamily(familyEntry);
|
|
|
|
}
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2012-03-09 06:05:24 +04:00
|
|
|
// returns default font for a given character, null otherwise
|
2014-09-30 10:27:55 +04:00
|
|
|
gfxFontEntry* CommonFontFallback(uint32_t aCh, uint32_t aNextCh,
|
2012-12-19 13:42:25 +04:00
|
|
|
int32_t aRunScript,
|
|
|
|
const gfxFontStyle* aMatchStyle,
|
|
|
|
gfxFontFamily** aMatchedFamily);
|
2012-03-09 06:05:24 +04:00
|
|
|
|
|
|
|
// search fonts system-wide for a given character, null otherwise
|
2012-08-22 19:56:38 +04:00
|
|
|
virtual gfxFontEntry* GlobalFontFallback(const uint32_t aCh,
|
|
|
|
int32_t aRunScript,
|
2012-03-09 06:05:24 +04:00
|
|
|
const gfxFontStyle* aMatchStyle,
|
2012-12-19 13:42:25 +04:00
|
|
|
uint32_t& aCmapCount,
|
|
|
|
gfxFontFamily** aMatchedFamily);
|
2012-03-09 06:05:24 +04:00
|
|
|
|
2012-03-09 06:05:40 +04:00
|
|
|
// whether system-based font fallback is used or not
|
|
|
|
// if system fallback is used, no need to load all cmaps
|
|
|
|
virtual bool UsesSystemFallback() { return false; }
|
|
|
|
|
2014-01-29 11:39:01 +04:00
|
|
|
// verifies that a family contains a non-zero font count
|
|
|
|
gfxFontFamily* CheckFamily(gfxFontFamily *aFamily);
|
|
|
|
|
2014-04-23 09:20:21 +04:00
|
|
|
// initialize localized family names
|
2009-08-16 17:52:12 +04:00
|
|
|
void InitOtherFamilyNames();
|
|
|
|
|
2014-04-23 09:20:20 +04:00
|
|
|
static PLDHashOperator
|
|
|
|
InitOtherFamilyNamesProc(nsStringHashKey::KeyType aKey,
|
|
|
|
nsRefPtr<gfxFontFamily>& aFamilyEntry,
|
|
|
|
void* userArg);
|
|
|
|
|
|
|
|
// search through font families, looking for a given name, initializing
|
|
|
|
// facename lists along the way. first checks all families with names
|
|
|
|
// close to face name, then searchs all families if not found.
|
|
|
|
gfxFontEntry* SearchFamiliesForFaceName(const nsAString& aFaceName);
|
|
|
|
|
|
|
|
static PLDHashOperator
|
|
|
|
ReadFaceNamesProc(nsStringHashKey::KeyType aKey,
|
|
|
|
nsRefPtr<gfxFontFamily>& aFamilyEntry,
|
|
|
|
void* userArg);
|
|
|
|
|
|
|
|
// helper method for finding fullname/postscript names in facename lists
|
|
|
|
gfxFontEntry* FindFaceName(const nsAString& aFaceName);
|
2010-01-29 04:41:25 +03:00
|
|
|
|
2014-04-23 09:20:20 +04:00
|
|
|
// look up a font by name, for cases where platform font list
|
|
|
|
// maintains explicit mappings of fullname/psname ==> font
|
|
|
|
virtual gfxFontEntry* LookupInFaceNameLists(const nsAString& aFontName);
|
2010-01-29 04:41:25 +03:00
|
|
|
|
2009-08-16 17:52:12 +04:00
|
|
|
// commonly used fonts for which the name table should be loaded at startup
|
|
|
|
virtual void PreloadNamesList();
|
|
|
|
|
2010-01-28 09:56:16 +03:00
|
|
|
// load the bad underline blacklist from pref.
|
|
|
|
void LoadBadUnderlineList();
|
2009-08-16 17:52:12 +04:00
|
|
|
|
|
|
|
void GenerateFontListKey(const nsAString& aKeyName, nsAString& aResult);
|
|
|
|
|
|
|
|
static PLDHashOperator
|
|
|
|
HashEnumFuncForFamilies(nsStringHashKey::KeyType aKey,
|
|
|
|
nsRefPtr<gfxFontFamily>& aFamilyEntry,
|
|
|
|
void* aUserArg);
|
|
|
|
|
2014-01-29 11:39:01 +04:00
|
|
|
virtual void GetFontFamilyNames(nsTArray<nsString>& aFontFamilyNames);
|
|
|
|
|
2009-08-16 17:52:12 +04:00
|
|
|
// gfxFontInfoLoader overrides, used to load in font cmaps
|
|
|
|
virtual void InitLoader();
|
2014-01-29 11:39:01 +04:00
|
|
|
virtual bool LoadFontInfo();
|
|
|
|
virtual void CleanupLoader();
|
2009-08-16 17:52:12 +04:00
|
|
|
|
2013-04-26 11:40:44 +04:00
|
|
|
// read the loader initialization prefs, and start it
|
|
|
|
void GetPrefsAndStartLoader();
|
|
|
|
|
2014-04-17 18:17:22 +04:00
|
|
|
// for font list changes that affect all documents
|
|
|
|
void ForceGlobalReflow();
|
|
|
|
|
2015-07-14 05:08:31 +03:00
|
|
|
void RebuildLocalFonts();
|
|
|
|
|
2012-03-28 01:38:39 +04:00
|
|
|
// used by memory reporter to accumulate sizes of family names in the hash
|
|
|
|
static size_t
|
|
|
|
SizeOfFamilyNameEntryExcludingThis(const nsAString& aKey,
|
|
|
|
const nsRefPtr<gfxFontFamily>& aFamily,
|
2013-06-23 16:03:39 +04:00
|
|
|
mozilla::MallocSizeOf aMallocSizeOf,
|
2012-03-28 01:38:39 +04:00
|
|
|
void* aUserArg);
|
|
|
|
|
2009-10-07 21:16:52 +04:00
|
|
|
// canonical family name ==> family entry (unique, one name per family entry)
|
2010-01-29 04:41:25 +03:00
|
|
|
nsRefPtrHashtable<nsStringHashKey, gfxFontFamily> mFontFamilies;
|
2009-08-16 17:52:12 +04:00
|
|
|
|
2014-08-19 16:46:17 +04:00
|
|
|
#if defined(XP_MACOSX)
|
|
|
|
// hidden system fonts used within UI elements
|
|
|
|
nsRefPtrHashtable<nsStringHashKey, gfxFontFamily> mSystemFontFamilies;
|
|
|
|
#endif
|
|
|
|
|
2010-01-29 04:41:25 +03:00
|
|
|
// other family name ==> family entry (not unique, can have multiple names per
|
2009-10-07 21:16:52 +04:00
|
|
|
// family entry, only names *other* than the canonical names are stored here)
|
2010-01-29 04:41:25 +03:00
|
|
|
nsRefPtrHashtable<nsStringHashKey, gfxFontFamily> mOtherFamilyNames;
|
|
|
|
|
2009-10-07 21:16:52 +04:00
|
|
|
// flag set after InitOtherFamilyNames is called upon first name lookup miss
|
2011-09-29 10:19:26 +04:00
|
|
|
bool mOtherFamilyNamesInitialized;
|
2009-10-07 21:16:52 +04:00
|
|
|
|
2010-01-29 04:41:25 +03:00
|
|
|
// flag set after fullname and Postcript name lists are populated
|
2014-04-23 09:20:20 +04:00
|
|
|
bool mFaceNameListsInitialized;
|
2010-01-29 04:41:25 +03:00
|
|
|
|
2013-09-02 12:41:57 +04:00
|
|
|
struct ExtraNames {
|
2014-08-06 17:31:21 +04:00
|
|
|
ExtraNames() : mFullnames(64), mPostscriptNames(64) {}
|
2013-09-02 12:41:57 +04:00
|
|
|
// fullname ==> font entry (unique, one name per font entry)
|
|
|
|
nsRefPtrHashtable<nsStringHashKey, gfxFontEntry> mFullnames;
|
|
|
|
// Postscript name ==> font entry (unique, one name per font entry)
|
|
|
|
nsRefPtrHashtable<nsStringHashKey, gfxFontEntry> mPostscriptNames;
|
|
|
|
};
|
|
|
|
nsAutoPtr<ExtraNames> mExtraNames;
|
2009-08-16 17:52:12 +04:00
|
|
|
|
2014-04-23 09:20:20 +04:00
|
|
|
// face names missed when face name loading takes a long time
|
|
|
|
nsAutoPtr<nsTHashtable<nsStringHashKey> > mFaceNamesMissed;
|
|
|
|
|
2014-04-23 09:20:21 +04:00
|
|
|
// localized family names missed when face name loading takes a long time
|
|
|
|
nsAutoPtr<nsTHashtable<nsStringHashKey> > mOtherNamesMissed;
|
|
|
|
|
2009-08-16 17:52:12 +04:00
|
|
|
// cached pref font lists
|
|
|
|
// maps list of family names ==> array of family entries, one per lang group
|
|
|
|
nsDataHashtable<nsUint32HashKey, nsTArray<nsRefPtr<gfxFontFamily> > > mPrefFonts;
|
|
|
|
|
|
|
|
// when system-wide font lookup fails for a character, cache it to skip future searches
|
|
|
|
gfxSparseBitSet mCodepointsWithNoFonts;
|
|
|
|
|
|
|
|
// the family to use for U+FFFD fallback, to avoid expensive search every time
|
|
|
|
// on pages with lots of problems
|
2012-12-19 13:42:25 +04:00
|
|
|
nsRefPtr<gfxFontFamily> mReplacementCharFallbackFamily;
|
2009-08-16 17:52:12 +04:00
|
|
|
|
2011-11-09 00:22:04 +04:00
|
|
|
nsTHashtable<nsStringHashKey> mBadUnderlineFamilyNames;
|
2010-01-28 09:56:16 +03:00
|
|
|
|
2012-04-19 03:59:43 +04:00
|
|
|
// character map data shared across families
|
|
|
|
// contains weak ptrs to cmaps shared by font entry objects
|
|
|
|
nsTHashtable<CharMapHashKey> mSharedCmaps;
|
|
|
|
|
2009-08-16 17:52:12 +04:00
|
|
|
// data used as part of the font cmap loading process
|
|
|
|
nsTArray<nsRefPtr<gfxFontFamily> > mFontFamiliesToLoad;
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t mStartIndex;
|
|
|
|
uint32_t mIncrement;
|
|
|
|
uint32_t mNumFamilies;
|
2014-04-17 18:17:22 +04:00
|
|
|
|
|
|
|
nsTHashtable<nsPtrHashKey<gfxUserFontSet> > mUserFontSetList;
|
2009-08-16 17:52:12 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* GFXPLATFORMFONTLIST_H_ */
|