diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2019-06-17 08:33:22 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2019-06-17 08:34:32 +0200 |
commit | fcb96af0215a9ae070face3997cdf84dafc057e5 (patch) | |
tree | 641924b3df6c1b4386e312af8025e6084f5440af | |
parent | 0d2a9408ed2a5c664330c5742c9afb610a6c7348 (diff) | |
download | qttools-fcb96af0215a9ae070face3997cdf84dafc057e5.tar.gz |
distancefieldgenerator: Fix cmap error for some fonts
We would accidentally use the raw field from the font without
converting its endianness, thus we would sanity check against the
wrong length and print out error messages for some perfectly
valid cmap subtables.
[ChangeLog][distancefieldgenerator] Fixed bug where the tool
would fail for valid fonts with the message "end of cmap
table reached when parsing subtable".
Task-number: QTBUG-76188
Change-Id: I7f84f4e161da705b49423ed3cc16a78cee67c607
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r-- | src/distancefieldgenerator/distancefieldmodelworker.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/distancefieldgenerator/distancefieldmodelworker.cpp b/src/distancefieldgenerator/distancefieldmodelworker.cpp index 373cb05ab..d140ff219 100644 --- a/src/distancefieldgenerator/distancefieldmodelworker.cpp +++ b/src/distancefieldgenerator/distancefieldmodelworker.cpp @@ -129,7 +129,7 @@ static void readCmapSubtable(DistanceFieldModelWorker *worker, const QByteArray return; } - const void *end = cmap.constData() + tableOffset + subtable->length; + const void *end = cmap.constData() + tableOffset + length; worker->readCmapSubtable(subtable, end); } |