doc: Warn about kerning in QRawFont::advancesForGlyphIndexes()
The fact that KernedAdvances does not work correctly on a majority of fonts is confusing. So we warn users that this is the case and point them to the correct function to use instead. Task-number: QTBUG-92930 Change-Id: I70f4b09ea1050fceabbff25a9c91008d1754f772 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>bb10
parent
f6c8798001
commit
678cbaebcf
|
|
@ -579,7 +579,12 @@ bool QRawFont::glyphIndexesForChars(const QChar *chars, int numChars, quint32 *g
|
|||
to make it appear as if the two glyphs are unspaced. How the advances are calculated is
|
||||
controlled by \a layoutFlags.
|
||||
|
||||
\sa QTextLine::horizontalAdvance(), QFontMetricsF::horizontalAdvance()
|
||||
\note When \c KernedAdvances is requested, this function will apply kerning rules from the
|
||||
TrueType table \c{KERN}, if this is available in the font. In many modern fonts, kerning is
|
||||
handled through OpenType rules or AAT rules, which requires a full shaping step to be applied.
|
||||
To get the results of fully shaping the text, use \l{QTextLayout}.
|
||||
|
||||
\sa QTextLine::horizontalAdvance(), QFontMetricsF::horizontalAdvance(), QTextLayout::glyphRuns()
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
|
@ -604,7 +609,12 @@ bool QRawFont::glyphIndexesForChars(const QChar *chars, int numChars, quint32 *g
|
|||
array \a glyphIndexes while the results are returned through \a advances, both of them must
|
||||
have \a numGlyphs elements. How the advances are calculated is controlled by \a layoutFlags.
|
||||
|
||||
\sa QTextLine::horizontalAdvance(), QFontMetricsF::horizontalAdvance()
|
||||
\note When \c KernedAdvances is requested, this function will apply kerning rules from the
|
||||
TrueType table \c{KERN}, if this is available in the font. In many modern fonts, kerning is
|
||||
handled through OpenType rules or AAT rules, which requires a full shaping step to be applied.
|
||||
To get the results of fully shaping the text, use \l{QTextLayout}.
|
||||
|
||||
\sa QTextLine::horizontalAdvance(), QFontMetricsF::horizontalAdvance(), QTextLayout::glyphRuns()
|
||||
*/
|
||||
bool QRawFont::advancesForGlyphIndexes(const quint32 *glyphIndexes, QPointF *advances, int numGlyphs, LayoutFlags layoutFlags) const
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue