mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-10-14 19:05:01 +08:00
handle case where font metrics do not declare width or height #35
This commit is contained in:
@@ -64,7 +64,17 @@
|
||||
{
|
||||
return new PdfRectangle(0, 0, 250, 0);
|
||||
}
|
||||
|
||||
if (metrics.WidthX == 0 && metrics.BoundingBox.Width > 0)
|
||||
{
|
||||
metrics.WidthX = metrics.BoundingBox.Width;
|
||||
}
|
||||
|
||||
if (metrics.WidthY == 0 && metrics.BoundingBox.Height > 0)
|
||||
{
|
||||
metrics.WidthY = metrics.BoundingBox.Height;
|
||||
}
|
||||
|
||||
return new PdfRectangle(0, 0, metrics.WidthX, metrics.WidthY);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user