Board.KolibriOS.org

Official KolibriOS board
It is currently Thu May 28, 2020 1:59 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: 1267
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: 1267
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: 1267
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: 1267
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 121 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: 5274
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: 216
Previous versions cut bottoms of curvy letters, the new version cuts tops. :)


Attachments:
truetype.gif
truetype.gif [ 2.33 KiB | Viewed 2002 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: Yandex [Bot] and 3 guests


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:  
Powered by phpBB® Forum Software © phpBB Limited