equal
deleted
inserted
replaced
517 |
517 |
518 QImage img = fe->alphaMapForGlyph(glyphIndex).convertToFormat(QImage::Format_Indexed8); |
518 QImage img = fe->alphaMapForGlyph(glyphIndex).convertToFormat(QImage::Format_Indexed8); |
519 glyph_metrics_t metrics = fe->boundingBox(glyphIndex); |
519 glyph_metrics_t metrics = fe->boundingBox(glyphIndex); |
520 |
520 |
521 const quint32 oldSize = glyphs.size(); |
521 const quint32 oldSize = glyphs.size(); |
522 glyphs.resize(glyphs.size() + sizeof(QFontEngineQPF::Glyph) + img.numBytes()); |
522 glyphs.resize(glyphs.size() + sizeof(QFontEngineQPF::Glyph) + img.byteCount()); |
523 uchar *data = reinterpret_cast<uchar *>(glyphs.data() + oldSize); |
523 uchar *data = reinterpret_cast<uchar *>(glyphs.data() + oldSize); |
524 |
524 |
525 uchar *gmapPtr = reinterpret_cast<uchar *>(gmap.data() + glyphIndex * sizeof(quint32)); |
525 uchar *gmapPtr = reinterpret_cast<uchar *>(gmap.data() + glyphIndex * sizeof(quint32)); |
526 qToBigEndian(oldSize, gmapPtr); |
526 qToBigEndian(oldSize, gmapPtr); |
527 |
527 |
541 << " width =" << glyph->width << "height =" << glyph->height |
541 << " width =" << glyph->width << "height =" << glyph->height |
542 << " advance =" << glyph->advance << "rounded from" << metrics.xoff |
542 << " advance =" << glyph->advance << "rounded from" << metrics.xoff |
543 ; |
543 ; |
544 } |
544 } |
545 |
545 |
546 qMemCopy(data, img.bits(), img.numBytes()); |
546 qMemCopy(data, img.bits(), img.byteCount()); |
547 } |
547 } |
548 } |
548 } |
549 } |
549 } |
550 |
550 |
551 addBlock(QFontEngineQPF::GMapBlock, gmap); |
551 addBlock(QFontEngineQPF::GMapBlock, gmap); |