Closed jheth closed 7 years ago
I propose the following change to fonts.rb
, dimensions_of
:
height = metrics_array.map { |m| m ? m[:boundingbox][3] : 0 } .max
height_min = (metrics_array.map { |m| m ? m[:boundingbox][1] : 0 }).min
height -= height_min if height_min > 0
Only subtract the min height if it's greater than 0.
I take part of this back. This is only an issue when font_size
is changing. I think it's font_size
andtext_valign
causing the problem.
Not an issue.
Hi @jheth ,
Thank you for opening this issue. I was without internet access for the last week and apologize for the belated response.
I see you closed the issue, so I assume everything works as expected.
If you find any unexpected behavior, please let me know. I'm happy to help.
Have a wonderful day, Bo.
Have you seen a scenario where
stamp_pages
mis-aligns text forbottom_left
,bottom
,bottom_right
when using characters that sit below the line?g, j, p, q, y
bottom_left: Introduction bottom: sample.docx bottom_right: 3
It's a noticeable height difference when only one position has one of these characters. It seems like the issue is with the height calculation. It's interesting that the top margin is not as noticeable.