commit 03f70ef48bfbd9c9cf80177151a1dc7290409f4b Author: Arthur Edelstein arthuredelstein@gmail.com 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,