mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-09-18 18:27:55 +08:00
Using Math.Max(letter.Width, letter.GlyphRectangle.Width) for word bounding box
This commit is contained in:
@@ -118,7 +118,7 @@
|
||||
minY = letter.StartBaseLine.Y;
|
||||
}
|
||||
|
||||
var right = letter.StartBaseLine.X + letter.GlyphRectangle.Width;
|
||||
var right = letter.StartBaseLine.X + Math.Max(letter.Width, letter.GlyphRectangle.Width);
|
||||
if (right > maxX)
|
||||
{
|
||||
maxX = right;
|
||||
@@ -157,7 +157,7 @@
|
||||
maxY = letter.StartBaseLine.Y;
|
||||
}
|
||||
|
||||
var right = letter.StartBaseLine.X + letter.GlyphRectangle.Width;
|
||||
var right = letter.StartBaseLine.X + Math.Max(letter.Width, letter.GlyphRectangle.Width);
|
||||
if (right < minX)
|
||||
{
|
||||
minX = right;
|
||||
|
Reference in New Issue
Block a user