Open uazo opened 1 year ago
We probably need to check the font family whitelist after FontFallback::MapCharacters
calls family->GetFirstMatchingFont
, which seems to be where DirectWrite does its magic to decide that font-family: Arial; font-stretch: condensed
should be treated as font-family: Arial Narrow
I followed another approach, which is to request the GDI name and block it if it is not present in a standard installation.
Description
Because of the direct-write management of fonts in Windows, it is possible to recover the presence of some fonts (such as Arial Narrow) using css with font-streatch.
Steps to Reproduce
Arial Narrow
must be present in the system. use:text is rendered with "Arial Narrow" font. correctly instead
font-family: Arial Narrow;
is not rendered.Actual result:
Expected result:
theoretically should not be visible
Reproduces how often:
always
Brave version (brave://version info)
v1.48.171
Miscellaneous Information:
I was developing a similar patch and noticed the bug. I wanted to report it.