flat assembler
Message board for the users of flat assembler.

Index > Linux > How to use unicode vector fonts in Linux?

Author
Thread Post new topic Reply to topic
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
I have to draw unicode vector fonts in Linux. I mean, using XLib or any other relatively low level library, not Qt, FLTK or GTK or other high level widget toolkit.
Any suggestions?
Post 04 Feb 2011, 09:16
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
AFAIK there are some libraries that can to do it, but I never ever used them. Take a look at freetype.org, for example.

Why do you have to do that?
Post 04 Feb 2011, 12:28
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
vid wrote:
Why do you have to do that?
Because of FreshLib. It needs some portable text output libraries. I know how Windows works with fonts, but for Linux I know only how XLib works with fonts and there is no scalable fonts at all. So, if I want to make similar features for Windows and Linux, I have to look for better way to draw text.
Post 04 Feb 2011, 12:40
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo
Quote:

I mean, using XLib or any other relatively low level library

is cairo enough low level for you? or xft?

Or do you mean XloadFont, XCreateGC, XDrawText, XFreeFont?
Post 04 Feb 2011, 14:35
View user's profile Send private message Yahoo Messenger Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
pelaillo wrote:
is cairo enough low level for you? or xft?
Or do you mean XloadFont, XCreateGC, XDrawText, XFreeFont?


Well, XLib is ok for me. But XLoadFont and other X functions use only bitmap fonts. Or I am wrong? Is it possible to make XLib (actually X server) to use vector fonts...
Now I am reading FreeType documentation. It probably will do the job, but the implementation is really weird - you need to render the string char by char on bitmaps and then to draw the bitmaps to the screen.
Post 04 Feb 2011, 14:46
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo
Quote:

but the implementation is really weird

Not weird, is the thing that every other library needed to do, just that the implementation is hidden in a more high level DrawString function...

XftFontOpenName -> XftTextExtents16 -> XftDrawCreate -> XftDrawString16
Post 04 Feb 2011, 15:46
View user's profile Send private message Yahoo Messenger Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
Yea, Xft is probably exactly what I need.
About FreeType you are right of course - it is only rendering engine. Not a library for application programming.
Post 04 Feb 2011, 15:54
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.