equal
deleted
inserted
replaced
219 return false; |
219 return false; |
220 } |
220 } |
221 |
221 |
222 HB_Glyph *g = glyphs->glyphs; |
222 HB_Glyph *g = glyphs->glyphs; |
223 const unsigned char* cmap = m_extensions->cmap(); |
223 const unsigned char* cmap = m_extensions->cmap(); |
|
224 const bool isRtl = (flags & QTextEngine::RightToLeft); |
224 for (int i = 0; i < len; ++i) { |
225 for (int i = 0; i < len; ++i) { |
225 const unsigned int uc = getChar(characters, i, len); |
226 const unsigned int uc = getChar(characters, i, len); |
226 *g++ = QFontEngine::getTrueTypeGlyphIndex(cmap, uc); |
227 *g++ = QFontEngine::getTrueTypeGlyphIndex(cmap, |
|
228 isRtl ? QChar::mirroredChar(uc) : uc); |
227 } |
229 } |
228 |
230 |
229 glyphs->numGlyphs = g - glyphs->glyphs; |
231 glyphs->numGlyphs = g - glyphs->glyphs; |
230 *nglyphs = glyphs->numGlyphs; |
232 *nglyphs = glyphs->numGlyphs; |
231 |
233 |
239 void QFontEngineS60::recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFlags flags) const |
241 void QFontEngineS60::recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFlags flags) const |
240 { |
242 { |
241 Q_UNUSED(flags); |
243 Q_UNUSED(flags); |
242 for (int i = 0; i < glyphs->numGlyphs; i++) { |
244 for (int i = 0; i < glyphs->numGlyphs; i++) { |
243 const glyph_metrics_t bbox = boundingBox_const(glyphs->glyphs[i]); |
245 const glyph_metrics_t bbox = boundingBox_const(glyphs->glyphs[i]); |
244 glyphs->advances_x[i] = glyphs->offsets[i].x = bbox.xoff; |
246 glyphs->advances_x[i] = bbox.xoff; |
245 glyphs->advances_y[i] = glyphs->offsets[i].y = bbox.yoff; |
247 glyphs->advances_y[i] = bbox.yoff; |
246 } |
248 } |
247 } |
249 } |
248 |
250 |
249 QImage QFontEngineS60::alphaMapForGlyph(glyph_t glyph) |
251 QImage QFontEngineS60::alphaMapForGlyph(glyph_t glyph) |
250 { |
252 { |