[escher/run_loop] Move kandinksy include

To check whether an ExternalText could be written with Epsilon's fonts,
UTF8Helper made a reference to Kandinsky, which is prohibited. This
check is now done in Escher, before dispatching the event.

Change-Id: I55e9db1ba43c3115775499db47b90a6bdd7cc7b3
This commit is contained in:
Gabriel Ozouf
2020-10-27 14:40:18 +01:00
committed by Émilie Feral
parent d5e810f2b8
commit 0185e0562c
8 changed files with 23 additions and 23 deletions

View File

@@ -159,3 +159,17 @@ KDFont::GlyphIndex KDFont::indexForCodePoint(CodePoint c) const {
return IndexForReplacementCharacterCodePoint;
#endif
}
bool KDFont::CanBeWrittenWithGlyphs(const char * text) {
UTF8Decoder decoder(text);
CodePoint cp = decoder.nextCodePoint();
while(cp != UCodePointNull) {
if (LargeFont->indexForCodePoint(cp) == KDFont::IndexForReplacementCharacterCodePoint
|| SmallFont->indexForCodePoint(cp) == KDFont::IndexForReplacementCharacterCodePoint)
{
return false;
}
cp = decoder.nextCodePoint();
}
return true;
}