[webkit-changes] [WebKit/WebKit] 9479bf: [FreeType] Do not special case the "sans" font fam...

Adrian Perez noreply at github.com
Tue Nov 21 03:16:00 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9479bf3bdea7bd0058626397711577c35bf73c95
      https://github.com/WebKit/WebKit/commit/9479bf3bdea7bd0058626397711577c35bf73c95
  Author: Adrian Perez de Castro <aperez at igalia.com>
  Date:   2023-11-21 (Tue, 21 Nov 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp

  Log Message:
  -----------
  [FreeType] Do not special case the "sans" font family name
https://bugs.webkit.org/show_bug.cgi?id=265182

Reviewed by Carlos Garcia Campos.

Do not consider "sans" a generic font family name, as it is not one
according to the CSS spec. This avoids shortcuts in the font matching
algorithm, which leads to picking a better font fallbacks instead if
the FontConfig configuration has odd bits like symbol fonts listed as
preferred in order to make sure symbols (e.g. emoji or PUA glyphs)
from it picked preferably to symbols from the actual font to be used.

* Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::isCommonlyUsedGenericFamily): Remove match on the "sans" font
family name.

Canonical link: https://commits.webkit.org/271007@main




More information about the webkit-changes mailing list