Board.KolibriOS.org

Official KolibriOS board
It is currently Mon May 20, 2019 12:05 pm

All times are UTC+03:00




Post new topic  Reply to topic  [ 12 posts ] 
Author Message
 Post subject: unicode rasterfont files
PostPosted: Sun Aug 17, 2014 4:10 pm 
Offline
User avatar

Joined: Sun May 11, 2014 9:21 pm
Posts: 97
Unicode on Kolibri is born:
To get started, I produced (on my win7 pc) 2 unicode raster font files : Arial regular and Consolas.
Both files have the data for 2211 glyphs, for the fontsizes 7,8,10,12, and 14, and take 460Kb each.
For now, I left out the Hebrew and Arabic glyphs. (I do not intent to implement RTL (right to left) typing).
Here is a screenshot of Greek and Cyrillic unicodes (0x400 to 0x520) in proportional Arial 10 on Kolibri OS.
Attachment:
File comment: Greek, Coptic, and Cyrillic
uex1.jpg
uex1.jpg [ 43.46 KiB | Viewed 2940 times ]

Anti-aliasing is obtained, because the font has a 4-bit color value for each pixel.
I did not add kerning information to the fontfile. I intent to realise kerning by evaluating the pixels.
My major problem is to obtain crispy glyphs for small fonts. I still need to elaborate on this.
I will publish working results (a new Klib version) as soon as I solved these problems.

Direct screen-draw issues

The drawing routine draws the pixels directly to the framebuffer (using GS).
(The Bitblit routine has no rasterop for color blending/transparency.)
I need to add clipping logic to prevent drawing in windows in front.
Can someone point me to assembly code for this clipping logic?

Utf-8 issues

I propose utf-8 coding for strings.
This makes low-level routines more complex, but it simplifies high level routines.
It avoids having two or more versions of many OS routines (like in Win32).
I believe it becomes the favourite coding method in networking.
Are there utf8 example routines in assembly around? Is Fasm utf-8 friendly?

_________________
Greetings from Seppe


Last edited by seppe on Sun Aug 17, 2014 9:38 pm, edited 1 time in total.

Top
   
PostPosted: Sun Aug 17, 2014 8:34 pm 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1247
There is some UTF-8 code in IRC client, see file 'encodings.inc' in svn/programs/network/ircc.

_________________
"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
   
PostPosted: Mon Aug 18, 2014 2:20 pm 
Offline
Kernel Developer
User avatar

Joined: Thu Sep 03, 2009 1:52 pm
Posts: 1619
What about licensing issues? Neither Arial nor Consolas are free fonts.

_________________
Сделаем мир лучше!


Top
   
PostPosted: Tue Aug 19, 2014 9:47 pm 
Offline
User avatar

Joined: Sun May 11, 2014 9:21 pm
Posts: 97
CleverMouse wrote:
What about licensing issues? Neither Arial nor Consolas are free fonts.

Yes, you have a point. But what other font(s) shall I use for extraction? :?
There are many fonts on the net, but i need a crispy font (or set) for small font-sizes with sufficient unicodes (Latin, Greek, Cyrillic).
I assume there must be suitable fonts in the Linux world.
Can someone advice? :?:

_________________
Greetings from Seppe


Top
   
PostPosted: Tue Aug 19, 2014 10:03 pm 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1247
Copyright is a strange thing http://en.wikipedia.org/wiki/Intellectu ... _typefaces

_________________
"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
   
PostPosted: Tue Aug 19, 2014 10:09 pm 
Offline
Mentor
User avatar

Joined: Mon Oct 19, 2009 10:58 am
Posts: 416
uw-ttyp0


Top
   
PostPosted: Sun Aug 24, 2014 3:27 pm 
Offline
User avatar

Joined: Sun May 11, 2014 9:21 pm
Posts: 97
dunkaist wrote:
Thank you for this URL.
On this site, Uwe Waldmann freely offers bdf text files for 1-bit unicode rasterfonts for several font sizes and font faces: regular and bold 12,14,16,18, 20, and italic 16,18.
These fontsizes represent the em-height in pixels.
I developed a font-compiler on win7 to produce the rasterfont files to be used on KolibriOS.
I named these files K1r.urf (210k) , K1b.urf (222k) , and K1i.urf (91K).
I wrote a Klib routine to parse utf-8 strings.
On KolibriOS, the result looks like this:
Attachment:
File comment: K1r, K1b, K1i
uwe.jpg
uwe.jpg [ 36.49 KiB | Viewed 2793 times ]

The good, the bad, the ugly . . .

+ no license problem
+ smaller fontfiles
+ lots of unicodes (including hebrew)
+ easy editing of the bdf fontfiles
+ later, I will port the font-compiler to KolibriOS
- monospaced only

A compiled rasterfile with regular 12 only, takes less then 40K.
This opens the possibility for having a unicode systemfont.
Let me know if you are interested to implement this.
This is how it would look on KolibriOS:

Attachment:
File comment: utf-8 coded unicode (12 point)
utf8ex.jpg
utf8ex.jpg [ 38.26 KiB | Viewed 2793 times ]

Rasterfonts without anti-aliasing look ugly, but for now, I would like to continue with these.
To develop: proportional font, combining chars, diacriticals, code page conversion, fontstyles, kerning, etc. . . .

Soon I will publish the new version of Klib, so you can experiment with unicode yourself.
After that, I will start a new topic on the forum for help with direct draw.
Attachment:
File comment: Greek, Cyrillic
Greek.jpg
Greek.jpg [ 34.65 KiB | Viewed 2793 times ]

_________________
Greetings from Seppe


Top
   
PostPosted: Sun Aug 24, 2014 7:34 pm 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1247
I'm all for a unicode system font.
Need 40 kilobyte of space? Remove 'invaders' from the games folder (It can be moved to the CD distro).
I'd like to see this inside kernel ofcourse, and original system fonts removed.

PS: have you tried compressing with KPACK? it uses LZMA compression afaik :)

_________________
"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
   
PostPosted: Tue Feb 24, 2015 11:37 am 
Offline
User avatar

Joined: Thu Nov 14, 2013 1:25 pm
Posts: 13
Is there PosGlue in the distro?
Is there any other program for editing and viewing fonts in KolibiOS?
What kind of distribution format you would like to use? Maybe https://en.wikipedia.org/wiki/Glyph_Bit ... ion_Format ?
Here you can find links to the great open libre font world: https://en.wikipedia.org/wiki/Open-sour ... _typefaces

_________________
Омская jabber-конференция GNU/Linux:
omsklug@conference.jabber.ru
Сайт Омского LUG:
http://www.omsklug.com


Top
   
PostPosted: Tue Feb 24, 2015 12:11 pm 
Offline
Designer
User avatar

Joined: Thu Jan 25, 2007 3:33 pm
Posts: 5047
Hello, seppe!

Would you mind to provide library for that fonts?

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


Top
   
PostPosted: Tue Feb 24, 2015 1:16 pm 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1247
The K1 fonts that you see in latest screenshots can be found here: http://ftp.kolibrios.org/users/seppe/Klib/Klib_fonts/
To test Seppe's programs, download http://ftp.kolibrios.org/users/seppe/kinst.exe installer onto an USB stick and execute it, download Klib folder (http://ftp.kolibrios.org/users/seppe/Klib/) to the root of that stick as well, and boot it in a computer.

But..
Seppe has since captured other (free) TTF fonts into URF2 rasterfont files.
These fonts can be found here: http://ftp.kolibrios.org/users/seppe/UrFonts/
URF2 font format specification here: http://ftp.kolibrios.org/users/seppe/Kl ... Layout.pdf
These fonts look much nicer, but are also a lot bigger.
I believe the fonts can be compressed better by removing the "Run Length Encoding" that it uses now, and compressing with LZMA, but havent tried this yet.

_________________
"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 Tue Feb 24, 2015 1:36 pm, edited 1 time in total.

Top
   
PostPosted: Tue Feb 24, 2015 1:32 pm 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1247
This is how the URF2 fonts look like: http://ftp.kolibrios.org/users/hidnplayr/urf2/

_________________
"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
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 12 posts ] 

All times are UTC+03:00


Who is online

Users browsing this forum: No registered users and 2 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