Skip to content

Commit

Permalink
PDF handler: fixed computation of character positions
Browse files Browse the repository at this point in the history
  • Loading branch information
mgieseki committed Oct 8, 2024
1 parent 1e34981 commit 0ff668e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PDFHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -662,10 +662,10 @@ void PDFHandler::doFillText (XMLElement *trcFillTextElement) {
_x = _y = numeric_limits<double>::max();
}
Matrix fontMatrix({trm[0]/ptsize, -trm[2]/ptsize, 0, trm[1]/ptsize, -trm[3]/ptsize});
fontMatrix.invert();
Matrix matrix = parse_attr_value<Matrix>(trcFillTextElement, "transform");
matrix.rmultiply(fontMatrix);
_svg->setMatrix(matrix);
fontMatrix.invert();
string colorspace = parse_attr_value<string>(trcFillTextElement, "colorspace");
string colorval = parse_attr_value<string>(trcFillTextElement, "color");
_svg->setFillColor(to_color(colorspace, colorval));
Expand Down

0 comments on commit 0ff668e

Please sign in to comment.