[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser/tor-browser-38.4.0esr-5.5-1] fixup! Bug #13313: Pref 'font.system.whitelist' restricts set of permitted fonts



commit 03f70ef48bfbd9c9cf80177151a1dc7290409f4b
Author: Arthur Edelstein <arthuredelstein@xxxxxxxxx>
Date:   Sat Dec 5 23:19:02 2015 -0800

    fixup! Bug #13313: Pref 'font.system.whitelist' restricts set of permitted fonts
---
 gfx/thebes/gfxUserFontSet.cpp |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/gfx/thebes/gfxUserFontSet.cpp b/gfx/thebes/gfxUserFontSet.cpp
index e313b17..e00894b 100644
--- a/gfx/thebes/gfxUserFontSet.cpp
+++ b/gfx/thebes/gfxUserFontSet.cpp
@@ -410,12 +410,14 @@ gfxUserFontEntry::LoadNextSrc()
         // src local ==> lookup and load immediately
 
         if (currSrc.mSourceType == gfxFontFaceSrc::eSourceType_Local) {
-            gfxFontEntry* fe =
-                gfxPlatform::GetPlatform()->LookupLocalFont(currSrc.mLocalName,
-                                                            mWeight,
-                                                            mStretch,
-                                                            mItalic);
-            mFontSet->SetLocalRulesUsed();
+            gfxFontEntry* fe = nullptr;
+            if (gfxFontUtils::IsFontFamilyNameAllowed(currSrc.mLocalName)) {
+                fe = gfxPlatform::GetPlatform()->LookupLocalFont(currSrc.mLocalName,
+                                                                 mWeight,
+                                                                 mStretch,
+                                                                 mItalic);
+                mFontSet->SetLocalRulesUsed();
+            }
             if (fe) {
                 LOG(("userfonts (%p) [src %d] loaded local: (%s) for (%s) gen: %8.8x\n",
                      mFontSet, mSrcIndex,

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits