summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Andrews <athenian200@outlook.com>2021-09-30 17:46:39 -0500
committerJeremy Andrews <athenian200@outlook.com>2021-09-30 17:46:39 -0500
commit87d9dd1d7acb74aa6ab3d6f67a6fe53ad2ece664 (patch)
treeb621fec28f50d349d42ee5180d35c18169aaaba2
parent95829005dcc05f81c15b59ea93d63c9868b6db39 (diff)
downloadaura-central-87d9dd1d7acb74aa6ab3d6f67a6fe53ad2ece664.tar.gz
No Issue - Always build with bundled fonts
-rw-r--r--gfx/thebes/gfxDWriteFontList.cpp14
-rw-r--r--gfx/thebes/gfxDWriteFontList.h4
-rw-r--r--gfx/thebes/gfxFcPlatformFontList.cpp6
-rw-r--r--gfx/thebes/gfxFcPlatformFontList.h2
-rw-r--r--gfx/thebes/gfxFontconfigUtils.cpp12
-rw-r--r--gfx/thebes/gfxFontconfigUtils.h2
-rw-r--r--gfx/thebes/gfxGDIFontList.h2
-rw-r--r--old-configure.in15
-rw-r--r--toolkit/content/license.html4
-rw-r--r--toolkit/fonts/moz.build3
-rw-r--r--toolkit/moz.build4
11 files changed, 2 insertions, 66 deletions
diff --git a/gfx/thebes/gfxDWriteFontList.cpp b/gfx/thebes/gfxDWriteFontList.cpp
index 12e2d8adc..c08ca8265 100644
--- a/gfx/thebes/gfxDWriteFontList.cpp
+++ b/gfx/thebes/gfxDWriteFontList.cpp
@@ -892,12 +892,10 @@ gfxDWriteFontList::InitFontListForPlatform()
QueryPerformanceCounter(&t4); // iterate over system fonts
-#ifdef MOZ_BUNDLED_FONTS
mBundledFonts = CreateBundledFontsCollection(factory);
if (mBundledFonts) {
GetFontsFromCollection(mBundledFonts);
}
-#endif
mOtherFamilyNamesInitialized = true;
GetFontSubstitutes();
@@ -1457,15 +1455,11 @@ public:
bool aLoadFaceNames,
bool aLoadCmaps,
IDWriteFontCollection* aSystemFonts
-#ifdef MOZ_BUNDLED_FONTS
, IDWriteFontCollection* aBundledFonts
-#endif
) :
FontInfoData(aLoadOtherNames, aLoadFaceNames, aLoadCmaps)
, mSystemFonts(aSystemFonts)
-#ifdef MOZ_BUNDLED_FONTS
, mBundledFonts(aBundledFonts)
-#endif
{}
virtual ~DirectWriteFontInfo() {}
@@ -1475,9 +1469,7 @@ public:
private:
RefPtr<IDWriteFontCollection> mSystemFonts;
-#ifdef MOZ_BUNDLED_FONTS
RefPtr<IDWriteFontCollection> mBundledFonts;
-#endif
};
void
@@ -1506,14 +1498,12 @@ DirectWriteFontInfo::LoadFontFamilyData(const nsAString& aFamilyName)
}
}
-#ifdef MOZ_BUNDLED_FONTS
if (!family && mBundledFonts) {
hr = mBundledFonts->FindFamilyName(famName.Elements(), &index, &exists);
if (SUCCEEDED(hr) && exists) {
mBundledFonts->GetFontFamily(index, getter_AddRefs(family));
}
}
-#endif
if (!family) {
return;
@@ -1658,16 +1648,13 @@ gfxDWriteFontList::CreateFontInfoData()
RefPtr<DirectWriteFontInfo> fi =
new DirectWriteFontInfo(false, NeedFullnamePostscriptNames(), loadCmaps,
mSystemFonts
-#ifdef MOZ_BUNDLED_FONTS
, mBundledFonts
-#endif
);
return fi.forget();
}
-#ifdef MOZ_BUNDLED_FONTS
#define IMPL_QI_FOR_DWRITE(_interface) \
public: \
@@ -1824,4 +1811,3 @@ gfxDWriteFontList::CreateBundledFontsCollection(IDWriteFactory* aFactory)
}
}
-#endif
diff --git a/gfx/thebes/gfxDWriteFontList.h b/gfx/thebes/gfxDWriteFontList.h
index 6bf094afa..c2ffeb0c9 100644
--- a/gfx/thebes/gfxDWriteFontList.h
+++ b/gfx/thebes/gfxDWriteFontList.h
@@ -407,10 +407,8 @@ private:
void GetFontsFromCollection(IDWriteFontCollection* aCollection);
-#ifdef MOZ_BUNDLED_FONTS
already_AddRefed<IDWriteFontCollection>
CreateBundledFontsCollection(IDWriteFactory* aFactory);
-#endif
/**
* Fonts listed in the registry as substitutes but for which no actual
@@ -436,9 +434,7 @@ private:
RefPtr<IDWriteTextFormat> mFallbackFormat;
RefPtr<IDWriteFontCollection> mSystemFonts;
-#ifdef MOZ_BUNDLED_FONTS
RefPtr<IDWriteFontCollection> mBundledFonts;
-#endif
};
diff --git a/gfx/thebes/gfxFcPlatformFontList.cpp b/gfx/thebes/gfxFcPlatformFontList.cpp
index 75e8fb76a..0fb4bcb3a 100644
--- a/gfx/thebes/gfxFcPlatformFontList.cpp
+++ b/gfx/thebes/gfxFcPlatformFontList.cpp
@@ -1110,9 +1110,7 @@ gfxFcPlatformFontList::gfxFcPlatformFontList()
}
}
-#ifdef MOZ_BUNDLED_FONTS
mBundledFontsInitialized = false;
-#endif
}
gfxFcPlatformFontList::~gfxFcPlatformFontList()
@@ -1220,11 +1218,9 @@ gfxFcPlatformFontList::InitFontListForPlatform()
AddFontSetFamilies(systemFonts, /* aAppFonts = */ false);
mAlwaysUseFontconfigGenerics = PrefFontListsUseOnlyGenerics();
-#ifdef MOZ_BUNDLED_FONTS
ActivateBundledFonts();
FcFontSet* appFonts = FcConfigGetFonts(nullptr, FcSetApplication);
AddFontSetFamilies(appFonts, /* aAppFonts = */ true);
-#endif
mOtherFamilyNamesInitialized = true;
@@ -1821,7 +1817,6 @@ gfxFcPlatformFontList::CheckFontUpdates(nsITimer *aTimer, void *aThis)
}
}
-#ifdef MOZ_BUNDLED_FONTS
void
gfxFcPlatformFontList::ActivateBundledFonts()
{
@@ -1847,7 +1842,6 @@ gfxFcPlatformFontList::ActivateBundledFonts()
FcConfigAppFontAddDir(nullptr, ToFcChar8Ptr(mBundledFontsPath.get()));
}
}
-#endif
#ifdef MOZ_WIDGET_GTK
/***************************************************************************
diff --git a/gfx/thebes/gfxFcPlatformFontList.h b/gfx/thebes/gfxFcPlatformFontList.h
index aa8f614a9..01929cc0e 100644
--- a/gfx/thebes/gfxFcPlatformFontList.h
+++ b/gfx/thebes/gfxFcPlatformFontList.h
@@ -291,11 +291,9 @@ protected:
virtual gfxFontFamily*
GetDefaultFontForPlatform(const gfxFontStyle* aStyle) override;
-#ifdef MOZ_BUNDLED_FONTS
void ActivateBundledFonts();
nsCString mBundledFontsPath;
bool mBundledFontsInitialized;
-#endif
// to avoid enumerating all fonts, maintain a mapping of local font
// names to family
diff --git a/gfx/thebes/gfxFontconfigUtils.cpp b/gfx/thebes/gfxFontconfigUtils.cpp
index 5bf606c13..4afb27e37 100644
--- a/gfx/thebes/gfxFontconfigUtils.cpp
+++ b/gfx/thebes/gfxFontconfigUtils.cpp
@@ -317,9 +317,7 @@ gfxFontconfigUtils::gfxFontconfigUtils()
, mFontsByFullname(32)
, mLangSupportTable(32)
, mLastConfig(nullptr)
-#ifdef MOZ_BUNDLED_FONTS
, mBundledFontsInitialized(false)
-#endif
{
UpdateFontListInternal();
}
@@ -583,16 +581,12 @@ gfxFontconfigUtils::UpdateFontListInternal(bool aForce)
if (currentConfig == mLastConfig)
return NS_OK;
-#ifdef MOZ_BUNDLED_FONTS
ActivateBundledFonts();
-#endif
// These FcFontSets are owned by fontconfig
FcFontSet *fontSets[] = {
FcConfigGetFonts(currentConfig, FcSetSystem)
-#ifdef MOZ_BUNDLED_FONTS
, FcConfigGetFonts(currentConfig, FcSetApplication)
-#endif
};
mFontsByFamily.Clear();
@@ -810,9 +804,7 @@ gfxFontconfigUtils::AddFullnameEntries()
// These FcFontSets are owned by fontconfig
FcFontSet *fontSets[] = {
FcConfigGetFonts(nullptr, FcSetSystem)
-#ifdef MOZ_BUNDLED_FONTS
, FcConfigGetFonts(nullptr, FcSetApplication)
-#endif
};
for (unsigned fs = 0; fs < ArrayLength(fontSets); ++fs) {
@@ -980,9 +972,7 @@ gfxFontconfigUtils::GetLangSupportEntry(const FcChar8 *aLang, bool aWithFonts)
// These FcFontSets are owned by fontconfig
FcFontSet *fontSets[] = {
FcConfigGetFonts(nullptr, FcSetSystem)
-#ifdef MOZ_BUNDLED_FONTS
, FcConfigGetFonts(nullptr, FcSetApplication)
-#endif
};
AutoTArray<FcPattern*,100> fonts;
@@ -1059,7 +1049,6 @@ gfxFontconfigUtils::GetFontsForLang(const FcChar8 *aLang)
return entry->mFonts;
}
-#ifdef MOZ_BUNDLED_FONTS
void
gfxFontconfigUtils::ActivateBundledFonts()
@@ -1087,7 +1076,6 @@ gfxFontconfigUtils::ActivateBundledFonts()
}
}
-#endif
gfxFontconfigFontBase::gfxFontconfigFontBase(cairo_scaled_font_t *aScaledFont,
FcPattern *aPattern,
diff --git a/gfx/thebes/gfxFontconfigUtils.h b/gfx/thebes/gfxFontconfigUtils.h
index eee69e481..db0fe518e 100644
--- a/gfx/thebes/gfxFontconfigUtils.h
+++ b/gfx/thebes/gfxFontconfigUtils.h
@@ -305,12 +305,10 @@ protected:
FcConfig *mLastConfig;
-#ifdef MOZ_BUNDLED_FONTS
void ActivateBundledFonts();
nsCString mBundledFontsPath;
bool mBundledFontsInitialized;
-#endif
};
class gfxFontconfigFontBase : public gfxFT2FontBase {
diff --git a/gfx/thebes/gfxGDIFontList.h b/gfx/thebes/gfxGDIFontList.h
index 60fb292e8..90ae413ed 100644
--- a/gfx/thebes/gfxGDIFontList.h
+++ b/gfx/thebes/gfxGDIFontList.h
@@ -342,9 +342,7 @@ private:
virtual already_AddRefed<FontInfoData> CreateFontInfoData();
-#ifdef MOZ_BUNDLED_FONTS
void ActivateBundledFonts();
-#endif
FontFamilyTable mFontSubstitutes;
nsTArray<nsString> mNonExistingFonts;
diff --git a/old-configure.in b/old-configure.in
index 179cdc5c2..76e2e91ab 100644
--- a/old-configure.in
+++ b/old-configure.in
@@ -3336,21 +3336,6 @@ AC_CHECK_PROGS(WGET, wget, "")
AC_SUBST(WGET)
dnl ========================================================
-dnl Bundled fonts on desktop platforms
-dnl ========================================================
-
-MOZ_ARG_ENABLE_BOOL(bundled-fonts,
-[ --enable-bundled-fonts Enable support for bundled fonts on desktop platforms],
- MOZ_BUNDLED_FONTS=1,
- MOZ_BUNDLED_FONTS=)
-
-if test -n "$MOZ_BUNDLED_FONTS"; then
- AC_DEFINE(MOZ_BUNDLED_FONTS)
-fi
-
-AC_SUBST(MOZ_BUNDLED_FONTS)
-
-dnl ========================================================
dnl Verify MAR signatures
dnl ========================================================
diff --git a/toolkit/content/license.html b/toolkit/content/license.html
index 65b4b1542..1e535f3da 100644
--- a/toolkit/content/license.html
+++ b/toolkit/content/license.html
@@ -88,9 +88,7 @@
<li><a href="about:license#dagre-d3">Dagre-D3 License</a></li>
#endif
<li><a href="about:license#dtoa">dtoa License</a></li>
-#if defined(XP_WIN) || defined(XP_LINUX)
<li><a href="about:license#twemoji">Twemoji License</a></li>
-#endif
<li><a href="about:license#expat">Expat License</a></li>
<li><a href="about:license#firebug">Firebug License</a></li>
<li><a href="about:license#gfx-font-list">gfxFontList License</a></li>
@@ -2824,7 +2822,6 @@ OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
<hr>
-#if defined(XP_WIN) || defined(XP_LINUX)
<h1><a id="twemoji"></a>Twemoji License</h1>
<p>This license applies to the emoji art contained within the bundled
@@ -2867,7 +2864,6 @@ publicity, privacy, or moral rights may limit how you use the material.
<hr>
-#endif
<h1><a id="expat"></a>Expat License</h1>
diff --git a/toolkit/fonts/moz.build b/toolkit/fonts/moz.build
index a2a37879d..129a7737c 100644
--- a/toolkit/fonts/moz.build
+++ b/toolkit/fonts/moz.build
@@ -3,5 +3,4 @@
# 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/.
-if CONFIG['OS_ARCH'] in ('WINNT', 'Linux'):
- FINAL_TARGET_FILES.fonts += ['TwemojiMozilla.ttf']
+FINAL_TARGET_FILES.fonts += ['TwemojiMozilla.ttf']
diff --git a/toolkit/moz.build b/toolkit/moz.build
index 9bf579bb2..3d0083540 100644
--- a/toolkit/moz.build
+++ b/toolkit/moz.build
@@ -6,6 +6,7 @@
DIRS += [
'components',
'content',
+ 'fonts',
'forgetaboutsite',
'locales',
'modules',
@@ -17,9 +18,6 @@ DIRS += [
'themes',
]
-if CONFIG['MOZ_BUNDLED_FONTS']:
- DIRS += ['fonts']
-
if CONFIG['MOZ_JETPACK']:
DIRS += ['jetpack']