It is currently Wed Dec 11, 2019 6:44 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Cross platform font ascent/descents!
PostPosted: Thu Jan 17, 2019 12:22 am 
Offline
PureBasic Expert
PureBasic Expert

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 10527
Location: Beyond the pale...
Rashad, that is a serious case of thinking outside of the box! In fact, you're so far out of the box I'm surprised you haven't fallen out and broken your neck! :)

You flipping genius!

I made a couple of tweaks (basically added the visible offset) and tests thus far seem very good. Only trouble with this is that the #PB_VectorText_Visible flag ideally requires that the actual text to be printed in each font is supplied up front whilst calculating the metrics (since the resulting text height depends on the text given) which is no good for me and should not be required for the calculation of the font metrics anyhow. A font ascent does not depend on any given set of characters to be printed.

However, for my purposes, if I switch to #PB_VectorText_Default I do not need to supply any text and the resulting loss of accuracy seems negligible. Certainly good enough for my purposes.

Nice one mate. I don't think I would have thought of trying that, though it is kind of obvious now! :)

Will update the code in the first post.

_________________
I may look like a mule, but I'm not a complete ass.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye