The cache_cost is measured in bytes and not kilobytes.

When increaseCost() is called then it will convert from bytes to kilobytes
so we need to specify the cache_cost to be in bytes.

Task-number: QTBUG-47812
Change-Id: I842514c9ab4d86b60b2beb6c80979156ea0de59c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
This commit is contained in:
Andy Shaw 2015-12-16 13:59:54 +01:00
parent e109b8a0f3
commit a88da6377d
2 changed files with 2 additions and 2 deletions

View File

@ -621,7 +621,7 @@ QFontEngineFT::QFontEngineFT(const QFontDef &fd)
matrix.yy = 0x10000;
matrix.xy = 0;
matrix.yx = 0;
cache_cost = 100;
cache_cost = 100 * 1024;
kerning_pairs_loaded = false;
transform = false;
embolden = false;

View File

@ -277,7 +277,7 @@ public:
qt_get_font_table_func_t get_font_table;
} faceData;
uint cache_cost; // amount of mem used in kb by the font
uint cache_cost; // amount of mem used in bytes by the font
uint fsType : 16;
bool symbol;
struct KernPair {