Add a check for multiple glyphs having the same calculated state

For linechars, currently 47 and 48 have the same state which shouldn't
be the case AFAIK.
(cherry picked from commit 30023209fe)
This commit is contained in:
Kurt Hindenburg
2013-09-22 10:23:24 -04:00
parent d4e5c9b50a
commit df70c6b3eb

View File

@@ -27,6 +27,8 @@
#include <QtCore/QFile>
#include <QtCore/QTextStream>
#include <KDebug>
using namespace std;
static quint32 charVal(QChar val)
@@ -75,6 +77,8 @@ int main(int argc, char **argv)
QTextStream input(&inFile);
quint32 glyphStates[128];
QMap<quint32, int> glyphMap;
for (int i = 0; i < 128; ++i)
glyphStates[i] = 0; //nothing..
@@ -94,6 +98,13 @@ int main(int argc, char **argv)
glyph = glyph - 0x2500;
glyphStates[glyph] = readGlyph(input);
// kWarning()<<glyph<<";"<<glyphStates[glyph];
if (glyphMap.contains(glyphStates[glyph])) {
kWarning()<<"Code "<<glyph<<" and "<<glyphMap.value(glyphStates[glyph])<<"have the same glyph state"<<glyphStates[glyph];
}
glyphMap[glyphStates[glyph]] = glyph;
}
//Output.