Board.KolibriOS.org

Official KolibriOS board
It is currently Sat Apr 20, 2019 8:04 am

All times are UTC+03:00




Post new topic  Reply to topic  [ 81 posts ]  Go to page Previous 1 2 3 4 5 6
Author Message
 Post subject: Re: TrueType
PostPosted: Tue Dec 09, 2014 12:23 am 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1247
Here is my version for the holidays..
* every function accepts UTF-8 now instead of archaic codepages.
* added 'height' dword after 'width' in text_out_mem function.
(So people can use existing blitting procedures / don't have to store 'height' somewhere else)
* Fixed 'get_width' function (problem was related to signed/unsigned datatypes).

_________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein


Last edited by hidnplayr on Thu Mar 12, 2015 8:01 pm, edited 1 time in total.

Top
   
 Post subject: Re: TrueType
PostPosted: Tue Dec 23, 2014 3:27 pm 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1247
An updated version of stb_truetype.h is available with (better) subpixel rendering (a technique called ClearType in Windows).
https://github.com/nothings/stb/blob/ma ... truetype.h

_________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein


Top
   
 Post subject: Re: TrueType
PostPosted: Thu Mar 12, 2015 12:37 pm 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1247
I moved the glue code (our own definition of malloc etc) to a separate file, so there are no changes needed to official stb_truetype.h file to build our KolibriOS library!
Here it is, compileable with latest stb_truetype.h (1.02)

There are still memory leaks unfortunately, speed is low and lots of warnings when compiling...

Ideas:
Fix memory leak(s)
Clean up code
Make compileable with MSVC

_________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein


Last edited by hidnplayr on Thu Mar 12, 2015 8:02 pm, edited 1 time in total.

Top
   
 Post subject: Re: TrueType
PostPosted: Thu Mar 12, 2015 8:01 pm 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1247
Fixed the big memory leak and some other loose ends.

(zfree was not working correctly all the time, because GCC did not know that mcall 68, 13 outputs in eax.)


Attachments:
ttf102.7z [41.14 KiB]
Downloaded 72 times

_________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein
Top
   
 Post subject: Re: TrueType
PostPosted: Thu Mar 12, 2015 8:22 pm 
Offline
Designer
User avatar

Joined: Thu Jan 25, 2007 3:33 pm
Posts: 4976
Great job! Please, upload to SVN now :)

_________________
Через тернии к звездам


Top
   
 Post subject: Re: TrueType
PostPosted: Thu Mar 12, 2015 10:47 pm 
Offline

Joined: Tue Oct 05, 2010 6:05 pm
Posts: 213
Previous versions cut bottoms of curvy letters, the new version cuts tops. :)


Attachments:
truetype.gif
truetype.gif [ 2.33 KiB | Viewed 1344 times ]
Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 81 posts ]  Go to page Previous 1 2 3 4 5 6

All times are UTC+03:00


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
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited