mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Eliminate error message for missing CMAP table (flutter/engine#25403)
CMAP tables are a component of fonts which map character codes to glyph indices used in the font. In cases where this is missing for a font that we attempt to load, there is not much gained by logging this. It's also a common source of false positive bug reports and bug reports with misleading symptoms in Flutter, such as https://github.com/flutter/flutter/issues/78929 Instead of logging the error, simply suppress it, since it's not actionable by the user. CMAP Reference: https://docs.microsoft.com/en-us/typography/opentype/spec/cmap
This commit is contained in:
parent
223aadfa8e
commit
e8fd8f2e2b
@ -181,7 +181,8 @@ void FontFamily::computeCoverage() {
|
||||
const uint32_t cmapTag = MinikinFont::MakeTag('c', 'm', 'a', 'p');
|
||||
HbBlob cmapTable(getFontTable(typeface, cmapTag));
|
||||
if (cmapTable.get() == nullptr) {
|
||||
ALOGE("Could not get cmap table size!\n");
|
||||
// Missing or corrupt font cmap table; bail out.
|
||||
// The cmap table maps charcodes to glyph indices in a font.
|
||||
return;
|
||||
}
|
||||
mCoverage = CmapCoverage::getCoverage(cmapTable.get(), cmapTable.size(),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user