mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[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:
committed by
Émilie Feral
parent
d5e810f2b8
commit
0185e0562c
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user