Skip to content

Commit

Permalink
Match font whitelist case insensitively (#13892)
Browse files Browse the repository at this point in the history
* Expand font whitelist on Windows

* Match font whitelist case insensitively

* .
  • Loading branch information
pilgrim-brave authored and wknapik committed Jun 23, 2022
1 parent fcce18b commit 53428c6
Show file tree
Hide file tree
Showing 3 changed files with 698 additions and 660 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,12 @@ bool BraveSessionCache::AllowFontFamily(
break;
case BraveFarblingLevel::BALANCED:
case BraveFarblingLevel::MAXIMUM: {
if (GetAllowedFontFamilies().contains(family_name.Utf8()))
if (GetAllowedFontFamilies().contains(family_name.LowerASCII().Ascii()))
return true;
#if BUILDFLAG(IS_WIN)
WTF::String locale = blink::DefaultLanguage().GetString().Left(2);
if (GetAdditionalAllowedFontFamiliesByLocale(locale).contains(
family_name.Utf8()))
family_name.LowerASCII().Ascii()))
return true;
#endif
FarblingPRNG prng = MakePseudoRandomGenerator();
Expand Down
Loading

0 comments on commit 53428c6

Please sign in to comment.