nanogui: fonts


Previous by date: 13 Jun 2001 18:08:54 -0000 Re: about MwDestroyWindow, Greg Haerr
Next by date: 13 Jun 2001 18:08:54 -0000 Re: Fonts, Leah Burstein
Previous in thread: 13 Jun 2001 18:08:54 -0000 Re: fonts, Greg Haerr
Next in thread: 13 Jun 2001 18:08:54 -0000 Re: Fonts, Leah Burstein

Subject: Fonts
From: "Leah Burstein" ####@####.####
Date: 13 Jun 2001 18:08:54 -0000
Message-Id: <004401c0f434$89423c30$7001010a@homeGopher.com>

Hi, 

I have problem in changing both font size and font name. For size, I can get only two different sizes. For name, I have installed True Type fonts according to these instructions:

*****************************************************************
1) Get, build and install the FreeType library version 1.3.1. You can get version 1.3.1 from the Microwindows FTP site: ftp://microwindows.censoft.com/pub/microwindows/

2) Modify the Microwindows config 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);
*******************************************************************************
In my case, the directory in step 3 is "/usr/local/srs/microwin/src/fonts". The rest is the same.
But still - in Hello Demo the following two things look the same way:

fontid=GrCreateFont((GR_CHAR*)"times",8,NULL);
    GrSetGCFont(gc, fontid);
    GrText (wid,gc,20,40,"Hello World", -1, GR_TFASCII);

 fontid=GrCreateFont((GR_CHAR*)"arial",11,NULL);
    GrSetGCFont(gc, fontid);
    GrText (wid,gc,20,60,"Hello World", -1, GR_TFASCII);

Am I missing something?

Thank you,
Leah.


Previous by date: 13 Jun 2001 18:08:54 -0000 Re: about MwDestroyWindow, Greg Haerr
Next by date: 13 Jun 2001 18:08:54 -0000 Re: Fonts, Leah Burstein
Previous in thread: 13 Jun 2001 18:08:54 -0000 Re: fonts, Greg Haerr
Next in thread: 13 Jun 2001 18:08:54 -0000 Re: Fonts, Leah Burstein


Powered by ezmlm-browse 0.20.