[fci] Do not add nullptr typeface to cache
The typeface cache is designed around deduplicating typeface ids. Since
the nullptr typeface does not have an id it makes no sense to cache it.
There is no means to get a "hit" on the nullptr typeface in any event,
since the typefaces in the cache are their own key. In the FCI case a
failed match is recorded in the request cache instead.
This issue was made apparent by the introduction of the use of
Fontations with FontConfig. FontConfig recognizes fonts with FreeType
which recognizes many formats and allows the use of some malformed font
data that Fontations will not recognize.
Bug: 406532537
Change-Id: I6849ceb8e21eab57038e9c2fd552e79b9a21998c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/975927
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
1 file changed