[kandinsky/font] Define IndexForReplacementCharacterCodePoint

This commit is contained in:
Ruben Dashyan
2020-01-29 14:54:30 +01:00
committed by Léa Saviot
parent dd92450115
commit 7cfdadd394
3 changed files with 12 additions and 15 deletions

View File

@@ -11,26 +11,24 @@ static constexpr KDFont::CodePointIndexPair table[] = {
constexpr KDFont testFont(4, table, 10, 10, nullptr, nullptr);
constexpr int defaultIndex = 132; // Taken from KDFont::indexForCodePoint
constexpr int numberOfTests = 16;
const KDFont::GlyphIndex index_for_code_point[numberOfTests] = {
static_cast<KDFont::GlyphIndex>(defaultIndex),
static_cast<KDFont::GlyphIndex>(defaultIndex),
static_cast<KDFont::GlyphIndex>(defaultIndex),
KDFont::IndexForReplacementCharacterCodePoint,
KDFont::IndexForReplacementCharacterCodePoint,
KDFont::IndexForReplacementCharacterCodePoint,
1,
2,
3,
static_cast<KDFont::GlyphIndex>(defaultIndex),
static_cast<KDFont::GlyphIndex>(defaultIndex),
static_cast<KDFont::GlyphIndex>(defaultIndex),
KDFont::IndexForReplacementCharacterCodePoint,
KDFont::IndexForReplacementCharacterCodePoint,
KDFont::IndexForReplacementCharacterCodePoint,
4,
static_cast<KDFont::GlyphIndex>(defaultIndex),
static_cast<KDFont::GlyphIndex>(defaultIndex),
KDFont::IndexForReplacementCharacterCodePoint,
KDFont::IndexForReplacementCharacterCodePoint,
5,
6,
7,
static_cast<KDFont::GlyphIndex>(defaultIndex),
KDFont::IndexForReplacementCharacterCodePoint,
};
QUIZ_CASE(kandinsky_font_index_for_code_point) {