Re: fonts in GTK?
- From: Tim Evans <t evans aranz com>
- To: gtk-app-devel-list gnome org
- Subject: Re: fonts in GTK?
- Date: Thu, 02 Oct 2003 12:37:42 +1200
stan huang wrote:
 Does GTk provides fonts such as special character
like pi or other mathematical symbols? IF so, how can
I get access to it? thanks.
Fonts are not provided by GTK itself, but by the underlying window 
system (actually on X11 it uses freetype).  To display a particular 
symbol you need to know what font it comes from and what character code 
it uses.  Under Windows you can use the Character Map accessory to find 
this out.  On Windows XP you can find it here:
    Start\Programs\Accessories\System Tools\Character Map
For example, under Windows XP, I can display a lowercase pi character by 
displaying the unicode character 03c0 ("\xcf\x80" in utf-8) in just 
about any font.  I would also disply it in italic using a pango markup 
string if I was using it in an equation "<i>\xcf\x80</i>".  I think that 
this would also work the same under X11 if you are using a unicode font 
that includes that symbol.  Testing that, I can see that it doesn't look 
much like a 'pi'.  It looks much better in a serif font, so the full 
markup string is this:
    "<span font_family=\"serif\" style=\"italic\">\xcf\x80</span>"
--
Tim Evans
Applied Research Associates NZ
http://www.aranz.com/
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]