summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Wodok <m.wodok@osb-ag.de>2012-05-31 10:14:13 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-06-01 15:03:36 (GMT)
commit420db97aad3fc1d11b0f1f97c5e9148e829883db (patch)
treeafbb5a15d7f2db1c8a9009463e48b32d9ff93deb
parent1907361140a4d94eeb2a7522d9818cffd4478370 (diff)
downloadQt-420db97aad3fc1d11b0f1f97c5e9148e829883db.zip
Qt-420db97aad3fc1d11b0f1f97c5e9148e829883db.tar.gz
Qt-420db97aad3fc1d11b0f1f97c5e9148e829883db.tar.bz2
makeqpf: Fixing range in character-generation
MakeQPF currently omits generating the last character in the selected ranges, e.g. ranges requested for conversion are 0..127 128..255 then only the characters 0..126 128..254 are generated in the QPF2 output file. This fixes it, so that character 255 (in this example) also gets created. This is according to the usage-specification! Change-Id: Id85215781c9a67a90ac05efbbf374240f25bbb3c Track-number: QTBUG-19561 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
-rw-r--r--tools/makeqpf/mainwindow.cpp2
-rw-r--r--tools/makeqpf/qpf2.cpp2
-rw-r--r--tools/makeqpf/qpf2.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/tools/makeqpf/mainwindow.cpp b/tools/makeqpf/mainwindow.cpp
index 08fa30b..ec5bb33 100644
--- a/tools/makeqpf/mainwindow.cpp
+++ b/tools/makeqpf/mainwindow.cpp
@@ -236,7 +236,7 @@ void MainWindow::on_sampleFile_editingFinished()
foreach (QChar ch, sortedCoverage) {
QPF::CharacterRange r;
r.start = ch.unicode();
- r.end = r.start + 1;
+ r.end = r.start;
sampleFileRanges.append(r);
}
diff --git a/tools/makeqpf/qpf2.cpp b/tools/makeqpf/qpf2.cpp
index ee37c53..30800c8 100644
--- a/tools/makeqpf/qpf2.cpp
+++ b/tools/makeqpf/qpf2.cpp
@@ -499,7 +499,7 @@ void QPF::addGlyphs(QFontEngine *fe, const QList<CharacterRange> &ranges)
foreach (CharacterRange range, ranges) {
if (debugVerbosity > 2)
qDebug() << "rendering range from" << range.start << "to" << range.end;
- for (uint uc = range.start; uc < range.end; ++uc) {
+ for (uint uc = range.start; uc <= range.end; ++uc) {
QChar ch(uc);
int nglyphs = 10;
if (!fe->stringToCMap(&ch, 1, &layout, &nglyphs, /*flags*/ 0))
diff --git a/tools/makeqpf/qpf2.h b/tools/makeqpf/qpf2.h
index 1a1df07..22e5c26 100644
--- a/tools/makeqpf/qpf2.h
+++ b/tools/makeqpf/qpf2.h
@@ -61,7 +61,7 @@ public:
struct CharacterRange
{
- inline CharacterRange() : start(0), end(0x10000) {}
+ inline CharacterRange() : start(0), end(0xffff) {}
uint start;
uint end;
};