Fix calculating glyph widths for Base14 fonts

This commit is contained in:
Svetlana Kulikova
2024-05-17 16:00:23 +03:00
parent c24c78267b
commit d853d42090
12 changed files with 108 additions and 18 deletions

View File

@ -177,7 +177,7 @@ void CCommandManager::Flush()
double dX = pText->GetX();
double dY = pText->GetY();
double dTextSize = pText->GetSize();
double dWidth = ((PdfWriter::CFontCidTrueType*)pText->GetFont())->GetWidth(ushCode) / 1000.0 * dTextSize;
double dWidth = pText->GetFont()->GetWidth(ushCode) / 1000.0 * dTextSize;
if (!oTextLine.Add(pCodes, unLen, dX, dY, dWidth, dTextSize))
{