Issue #2191 - Remove as much old fontconfig support as needed for Harfbuzz update.

Based on Mozilla bugs 1119128, 1285533, and 1421964.

gfx.font_rendering.fontconfig.fontlist.enabled is no longer available.

gfxFontconfigUtils.h still exists, and will be removed in another commit. Just
need more research on bug 1385029.

Tag #1862
This commit is contained in:
Job Bautista 2023-04-04 21:48:39 +08:00 committed by roytam1
commit b5d5963a4f
17 changed files with 37 additions and 3966 deletions

View file

@ -26,10 +26,6 @@
#include "mozilla/gfx/Logging.h" // for gfxCriticalError
#include "mozilla/UniquePtr.h"
#if defined(MOZ_WIDGET_GTK)
#include "gfxPlatformGtk.h" // xxx - for UseFcFontList
#endif
#ifdef XP_WIN
#include "gfxWindowsPlatform.h"
#endif
@ -1599,7 +1595,6 @@ gfxFontGroup::gfxFontGroup(const FontFamilyList& aFontFamilyList,
, mPageLang(gfxPlatformFontList::GetFontPrefLangFor(aStyle->language))
, mLastPrefFirstFont(false)
, mSkipDrawing(false)
, mSkipUpdateUserFonts(false)
{
// We don't use SetUserFontSet() here, as we want to unconditionally call
// BuildFontList() rather than only do UpdateUserFonts() if it changed.
@ -1616,14 +1611,6 @@ gfxFontGroup::BuildFontList()
{
bool enumerateFonts = true;
#if defined(MOZ_WIDGET_GTK)
// xxx - eliminate this once gfxPangoFontGroup is no longer needed
enumerateFonts = gfxPlatformGtk::UseFcFontList();
#endif
if (!enumerateFonts) {
return;
}
// initialize fonts in the font family list
AutoTArray<gfxFontFamily*,10> fonts;
gfxPlatformFontList *pfl = gfxPlatformFontList::PlatformFontList();
@ -2338,7 +2325,7 @@ gfxFontGroup::InitScriptRun(DrawTarget* aDrawTarget,
"don't call InitScriptRun with aborted shaping state");
// confirm the load state of userfonts in the list
if (!mSkipUpdateUserFonts && mUserFontSet &&
if (mUserFontSet &&
mCurrGeneration != mUserFontSet->GetGeneration()) {
UpdateUserFonts();
}
@ -3076,8 +3063,6 @@ gfxFontGroup::GetRebuildGeneration()
return mUserFontSet->GetRebuildGeneration();
}
// note: gfxPangoFontGroup overrides UpdateUserFonts, such that
// BuildFontList is never used
void
gfxFontGroup::UpdateUserFonts()
{