Page 1 of 6

TrueType

Posted: Tue Apr 10, 2012 12:56 pm
by bubach
Hi, I'm not sure if this is the right sub-forum - and even though the forums have english describtions, all posts are in russian for no apparent reason?

Anyway, as KolibriOS is probably the most active menuet fork here's a link to a small truetype support file in C.
http://mollyrocket.com/forums/viewtopic.php?t=736

I know it's in C, but it's waaay smaller than freetype lib and also, much of the code is examples, all baked into one .h file. Maybe it can give inspiration to create native truetype support, or it could be compiled as-is for temparary support?

Regards,
Christoffer

Re: truetype

Posted: Tue Apr 10, 2012 2:17 pm
by SoUrcerer
Wow. I'm making my implementation of cool vector fonts, but it's cool too. I'll take a look.

Re: truetype

Posted: Wed Apr 11, 2012 8:24 am
by SoUrcerer
Pretty cool. I didn't figured out how to use it with unicode, though. If I find how to make it work with russian, I'll prepare demo.

Re: truetype

Posted: Wed Apr 11, 2012 8:33 am
by SoUrcerer
Upd: stupid Linux, stupid UTF-8! Everythin' works perfect. Packed Kolibri library should have size about 10 Kb. One nice TTF - about 70-80 Kb. The problem is EVERY program must have copy of TTF in memory. So, I need help with named memory regions for "system" true type font loaded after booting.

Re: TrueType

Posted: Wed Apr 11, 2012 10:49 am
by SoUrcerer
So, I managed to compile this library. It's public domain, so, it's just AWESOME. Works pretty fast.
There are two examples (both statically-linked now):
letter.kex draws letter "Я", you can scale it as you wish
string.kex draws "Hello world" string (or anything else you pass to it through command line).

String.kex doesn't support very long strings (you'll see something weird :D just as planned), as well as russian letters (because I must add my UTF16 converter to it and make few little fixes). Also, you can't scale label yet :D

UPD: St.kex is fixed string.kex, which support russian letters (I added dos2utf, which created for my own library).

I think, I can make COFF (standard Kolibri) library for handling TrueType (based on this library) in a few hours. Resulted binary should be about 10 Kb (I checked size already).

So, dear community, I need help with shared named memory, to store "system" TTF in it (it should save A LOT of RAM).

Re: TrueType

Posted: Wed Apr 11, 2012 12:17 pm
by Mario
How about license for TTF fonts?
http://en.wikipedia.org/wiki/TrueType
We must carefully examine all the details before you adopt someone else's technology as one of the standards in the KolibriOS.

Re: TrueType

Posted: Wed Apr 11, 2012 12:23 pm
by SoUrcerer
This library doesn't use hinting. Moreover, patents are expired.

Re: TrueType

Posted: Wed Apr 11, 2012 12:27 pm
by Mario
Patent for the TTF font file != Patent for the library.
Some fonts do not have a free license.

Re: TrueType

Posted: Wed Apr 11, 2012 12:32 pm
by SoUrcerer
Of course. But DejaVu is free font.

Re: TrueType

Posted: Wed Apr 11, 2012 4:22 pm
by Albom
SoUrcerer Using sharing memory is very simple. You can see shell 0.5 sources. I added some functions to kolibri.c and they are used in module_program_console.c.

Re: TrueType

Posted: Wed Apr 11, 2012 5:01 pm
by SoUrcerer
Thank you :)

Re: TrueType

Posted: Sun Apr 22, 2012 6:12 pm
by bubach
Cool! I'm glad it was useful!

BTW, kolibri.c ? Have you changed over to parts of kolibri written in C? What else is new, there haven't been any official release since 2009 and it's very difficult to follow any progress on these forums when everything is in russian. :(

Regards,
Christoffer

Re: TrueType

Posted: Sun Apr 22, 2012 7:25 pm
by SoUrcerer
bubach wrote:Cool! I'm glad it was useful!

BTW, kolibri.c ? Have you changed over to parts of kolibri written in C? What else is new, there haven't been any official release since 2009 and it's very difficult to follow any progress on these forums when everything is in russian. :(

Regards,
Christoffer
Didn't get it. Kolibri's kernel is still written in Fasm, and this library is just statically-linked to C-program. I'm trying to make DLL from this library, but it isn't easy. I think I can make my own library faster :(
You're right, there are no new official release, but we have autobuilds ( http://builds.kolibrios.org/ ), latest was built yesterday. I hope we'll have new web-site with software catalogue, list of compatible hardware and so on, but it isn't so easy - we haven't designers or they are very busy :(

upd.. Ah, kolibri.c. It's just wrapper for Kolibri system functions. Can be used with GCC, MSVC and TCC.

Re: TrueType

Posted: Mon Apr 23, 2012 2:11 am
by bubach
Ah ok. I understand. Ok, I didn't know there was any work done on font so i yhought you might be able to port it. :P

anyway thats nice to hear I hope you will try to include some english on the new webpage as well ;)

Re: TrueType

Posted: Mon Apr 23, 2012 10:44 am
by SoUrcerer
Do you know about http://kolibrios.org/en/ ? Or you talking about something else?