Issue #50: Type3 font advance fix

This commit is contained in:
Jakub Melka 2023-05-01 20:07:49 +02:00
parent 5db941954f
commit 8acf688f0f
1 changed files with 6 additions and 2 deletions

View File

@ -3250,7 +3250,7 @@ void PDFPageContentProcessor::drawText(const TextSequence& textSequence)
}
else if (item.isAdvance())
{
if (horizontalScaling)
if (isHorizontalWritingSystem)
{
displacementX = -item.advance * 0.001 * fontSize * horizontalScaling;
}
@ -3293,7 +3293,11 @@ void PDFPageContentProcessor::drawText(const TextSequence& textSequence)
// First, compute horizontal advance
qreal displacementX = 0.0;
if (item.advance != 0.0)
if (!item.isContentStream())
{
displacementX = -item.advance * 0.001 * fontSize * horizontalScaling;
}
else if (item.advance != 0.0)
{
qreal ry = 0.0;
fontAdjustedMatrix.map(item.advance, 0.0, &displacementX, &ry);