Page 6 of 6

Re: TrueType

Posted: Tue Dec 09, 2014 12:23 am
by hidnplayr
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).

Re: TrueType

Posted: Tue Dec 23, 2014 3:27 pm
by hidnplayr
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

Re: TrueType

Posted: Thu Mar 12, 2015 12:37 pm
by hidnplayr
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

Re: TrueType

Posted: Thu Mar 12, 2015 8:01 pm
by hidnplayr
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.)

Re: TrueType

Posted: Thu Mar 12, 2015 8:22 pm
by Leency
Great job! Please, upload to SVN now :)

Re: TrueType

Posted: Thu Mar 12, 2015 10:47 pm
by lev
Previous versions cut bottoms of curvy letters, the new version cuts tops. :)