mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-09-22 13:01:05 +03:00
Fix a couple of false positive unit-tests in Linux.
This commit is contained in:
@@ -504,7 +504,8 @@ FontDesc SystemFontResolver::getFallbackForCodepoint( Uint32 codepoint, FontWeig
|
||||
}
|
||||
|
||||
FontDesc nativeMatch = matchFallbackForCodepoint( codepoint, weight, italic );
|
||||
if ( !nativeMatch.path.empty() && !( isEmoji && fontHasSvgTable( nativeMatch.path ) ) ) {
|
||||
if ( !nativeMatch.path.empty() && fontContainsCodepoint( nativeMatch.path, codepoint ) &&
|
||||
!( isEmoji && fontHasSvgTable( nativeMatch.path ) ) ) {
|
||||
Lock lock( mMutex );
|
||||
mCodepointFallbackCache[codepoint] = nativeMatch.path;
|
||||
return nativeMatch;
|
||||
|
||||
@@ -375,6 +375,10 @@ UTEST( FontRendering, shapedTextUsesSystemFallbackForCommonSymbols ) {
|
||||
const Uint32 codepoint = symbols[glyph.stringIndex];
|
||||
if ( codepoint == ' ' )
|
||||
continue;
|
||||
FontDesc fallback = SystemFontResolver::instance()->getFallbackForCodepoint(
|
||||
codepoint, FontWeight::Normal, false );
|
||||
if ( fallback.path.empty() )
|
||||
continue;
|
||||
EXPECT_NE( 0u, glyph.glyphIndex );
|
||||
EXPECT_NE( font.get(), glyph.font );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user