Fix font metrics recording to only include font data in output digest
Currently in FontMatchingMetrics, the check_type and is_loading_fallback flag are included as part of the output digest. However, these do not represent an output. Instead, they represent different kinds of lookup or a temporary state. By including them in the output digest, we cannot determine if two lookups at different points in the font matching process resulted in the same font or not. We remove check_type and instead split the IdentifiableSurface::Type to account for different kinds of lookup, including splitting lookups that can match only unique font names (i.e. src:local specifiers) and lookups that can also match family names (i.e. font-family specifiers). We adapt FontMatchingMetrics' HashMaps accordingly. We also ensure other lookup values are appropriate by: - including FontFallbackPriority for lookups by fallback character, - handling FontDescription::GenericFamilyType properly, - considering font names to be case-insensitive, and - ignoring any lookups where is_loading_fallback is true. Bug: 1121669 Change-Id: I398ad1359c5c6bae51b8bb8b4f236c1944c3e000 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2376037 Commit-Queue: Alex Turner <alexmt@chromium.org> Reviewed-by:Dominik Röttsches <drott@chromium.org> Reviewed-by:
Asanka Herath <asanka@chromium.org> Cr-Commit-Position: refs/heads/master@{#804957}
Showing
Please register or sign in to comment