mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Editor plugin: WIP
This commit is contained in:
@ -749,7 +749,7 @@ void PDFRealizedFontImpl::fillTextSequence(const QByteArray& byteArray, TextSequ
|
||||
if (glyphIndex)
|
||||
{
|
||||
const Glyph& glyph = getGlyph(glyphIndex);
|
||||
textSequence.items.emplace_back(&glyph.glyph, (*encoding)[static_cast<uint8_t>(byteArray[i])], glyph.advance);
|
||||
textSequence.items.emplace_back(&glyph.glyph, (*encoding)[static_cast<uint8_t>(byteArray[i])], glyph.advance, static_cast<CID>(byteArray[i]));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -757,7 +757,7 @@ void PDFRealizedFontImpl::fillTextSequence(const QByteArray& byteArray, TextSequ
|
||||
if (glyphWidth > 0)
|
||||
{
|
||||
const QPainterPath* nullpath = nullptr;
|
||||
textSequence.items.emplace_back(nullpath, QChar(), glyphWidth * m_pixelSize * FONT_WIDTH_MULTIPLIER);
|
||||
textSequence.items.emplace_back(nullpath, QChar(), glyphWidth * m_pixelSize * FONT_WIDTH_MULTIPLIER, static_cast<CID>(byteArray[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -784,7 +784,7 @@ void PDFRealizedFontImpl::fillTextSequence(const QByteArray& byteArray, TextSequ
|
||||
{
|
||||
QChar character = toUnicode->getToUnicode(cid);
|
||||
const Glyph& glyph = getGlyph(glyphIndex);
|
||||
textSequence.items.emplace_back(&glyph.glyph, character, glyph.advance);
|
||||
textSequence.items.emplace_back(&glyph.glyph, character, glyph.advance, cid);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -799,7 +799,7 @@ void PDFRealizedFontImpl::fillTextSequence(const QByteArray& byteArray, TextSequ
|
||||
// We do not multiply advance with font size and FONT_WIDTH_MULTIPLIER, because in the code,
|
||||
// "advance" is treated as in font space.
|
||||
const QPainterPath* nullpath = nullptr;
|
||||
textSequence.items.emplace_back(nullpath, QChar(), -glyphWidth);
|
||||
textSequence.items.emplace_back(nullpath, QChar(), -glyphWidth, cid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2680,7 +2680,7 @@ void PDFRealizedType3FontImpl::fillTextSequence(const QByteArray& byteArray, Tex
|
||||
|
||||
if (contentStream)
|
||||
{
|
||||
textSequence.items.emplace_back(contentStream, character, width);
|
||||
textSequence.items.emplace_back(contentStream, character, width, index);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user