mirror of
https://github.com/KDE/konsole.git
synced 2026-06-13 00:15:55 -04:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user