nanogui: How to add new font?


Previous by date: 23 Apr 2001 07:11:26 -0000 How to add new font?, yi yang
Next by date: 23 Apr 2001 07:11:26 -0000 Re: widget tools on MicroWindows, Victor Rogachev
Previous in thread: 23 Apr 2001 07:11:26 -0000 How to add new font?, yi yang
Next in thread: 23 Apr 2001 07:11:26 -0000 Re: How to add new font?, Greg Haerr

Subject: Re: How to add new font?
From: Gary James ####@####.####
Date: 23 Apr 2001 07:11:26 -0000
Message-Id: <20010423031210.A1892@pc.twcny.rr.com>

On Sun, 22 Apr 2001 23:49:39 yi yang wrote:
> Hi,
>     I only find two kinds of fonts in nanoX -- 11
> pixels and 14 pixels. 
>     If I want to add some new font, what should I do? 
> 
> Best Regards,
> Yi Yang


Here's some notes on how to add TrueType fonts to Microwindows.

1) Get, build and install the FreeType library version 1.3.1. I don't know
if the newer 2.x versions will work. You can get version 1.3.1 from the
Microwindows FTP
site: ftp://microwindows.censoft.com/pub/microwindows/

2) Modify the Microwindows cinfig file in ".../microwin/src/" directory.
Change "HAVE_FREETYPE_SUPPORT" to "Y". Modify "INCFTLIB" and "LIBFTLIB" to
point to the directories that contain the FreeType libraries. On my system
it was "INCFTLIB = /usr/local/include" and "LIBFTLIB =
/usr/local/lib/libttf.so". Re-build and re-install Microwindows.

3) Create a directory "/usr/local/microwin/fonts/" on your target machine
to hold TrueType fonts. You can get some free truetype fonts from this
site: http://www.microsoft.com/typography/fontpack/default.htm

4) Load the fonts at runtime with the following commands (for nano-X):
font = GrCreateFont ((GR_CHAR*) "arial", 8, NULL);
font = GrCreateFont ((GR_CHAR*) "comic", 12, NULL);
font = GrCreateFont ((GR_CHAR*) "comic", 24, NULL);


Gary James
####@####.####
http://home.twcny.rr.com/embedded/index.htm





Previous by date: 23 Apr 2001 07:11:26 -0000 How to add new font?, yi yang
Next by date: 23 Apr 2001 07:11:26 -0000 Re: widget tools on MicroWindows, Victor Rogachev
Previous in thread: 23 Apr 2001 07:11:26 -0000 How to add new font?, yi yang
Next in thread: 23 Apr 2001 07:11:26 -0000 Re: How to add new font?, Greg Haerr


Powered by ezmlm-browse 0.20.