ajstarks / openvg

Tools for exploring OpenVG
Other
414 stars 85 forks source link

Updated font handing #42

Open ajstarks opened 8 years ago

ajstarks commented 8 years ago

This is a tracking bug to discuss the implementation of updated font handling.

TaoHawaii commented 6 years ago

TextMid() doesn't correctly set the Y offset. I am making digital gauges and I used "double radius*sin(pi/180)+(width/2)" to get the Y coordinate of evenly spaced text around the center of the screen. I used the same code (copy and paste) to draw small circles around the points where the TextMid() characters should be. The center of the circles lines up very well with the bottom of the characters all the way around.

paeryn commented 6 years ago

That is how it is supposed to be, the text will be centre justified at the point given.

Text() draws the string left justified, TextMid() draws the string centre justified, TextEnd() draws the string right justified.

In all three the baseline of the font will be on the point. Were you thinking that the centre of the bounding box of the text would be at that point?

TaoHawaii commented 6 years ago

Yes, that;s what I was thinking. Thanks!

On Sat, Oct 21, 2017 at 8:58 PM, Paeryn notifications@github.com wrote:

That is how it is supposed to be, the text will be centre justified at the point given.

Text() draws the string left justified, TextMid() draws the string centre justified, TextEnd() draw the string right justified.

In all three the baseline of the font will be on the point. Were you thinking that the centre of the bounding box of the text would be at that point?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ajstarks/openvg/issues/42#issuecomment-338420866, or mute the thread https://github.com/notifications/unsubscribe-auth/AVG23yQwMHOdXtkPABrEb_Ko-W4KCmAZks5sujDPgaJpZM4HBsRx .