Hide the justification algorithm implementation details

The justification "classes" stored in the glyph attributes
are actually a justification priorities suitable for a particular
language (script). The external API only uses the justification
metrics array calculated on top of these priorities.

Change-Id: I5b0a39e35954084c63a798b632fd6108f9ae7608
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Make QGlyphLayout consume one byte less per glyph

Change-Id: Iddcc2e1f284dcf13ae98b57ea2d5854e57c83530
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix QFontEngineQPA::recalcAdvances() in case of missing glyph

Modifying the glyph indexes array in recalcAdvances() could lead
to undefined behavior.

Change-Id: Ibbb6642f381a5fe01b285dc8d2001c167dc66f46
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Get rid of unused variable

Change-Id: Ie90914c2110d32e573108a355a44dd459097a755
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Unify QFontEngine*::stringToCMap() behavior

Ensure the params are valid and make QCoreTextFontEngine::stringToCMap()
handle the unsufficient buffer case exactly like the other engines does.

Change-Id: I078af37da917cf2bac709b12aa827ed4128e5f30
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Introduce QFontEngine::glyphIndex(uint)

...an optimized drop-in replacement for the code like this:
`stringToCMap(&uc, 1, &g, &numGlyphs, QFontEngine::GlyphIndicesOnly)`
(aka "get the glyph index for exactly one Unicode character").

Change-Id: I22babf49f7cf28892d27533a5ac51ad449779f75
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Introduce a generic QFontEngine::canRender() implementation

...which uses the recently introduced glyphIndex() method;
get rid of re-implementations that did almost the same.

Change-Id: I6d32d2cee6a31f57de6aee05ed8d120d4a1f4e9c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>