Microwindows uses the open source FreeType library to render TrueType fonts. Microwindows works with version 1.3.1 of the FreeType library. At the time of this article the FreeType library is at version 2.0.3. I do not know if this version works with Microwindows. FreeType version 1.3.1 is known to work and can be downloaded from the Microwindows ftp site. The sources come in a tarball named freetype-1.3.1.tar.gz. Copy this file into a convenient spot. I copied the file into my home directory /home/gary.
The tarball is a compressed tar file. You must first uncompress the file using gunzip, then extract the sources from the tar file using tar. This creates a new directory named freetype-1.3.1 that contains the FreeType source tree. Type the following commands.
$ tar -xzf freetype-1.3.1.tar.gz |
Change directories to the new FreeType source directory.
$ cd freetype-1.3.1 |
Build the FreeType library by typing:
$ ./configure $ make |
If everything went as planned and the library built without errors then you should install the libraries now. Switch to root user id and type:
# make install |
Modify the Microwindows config file .../microwin/src/config. Change HAVE_FREETYPE_SUPPORT to Y. Modify INCFTLIB and LIBFTLIB to point to the directories that contain the FreeType libraries that you just built. On my system it's as shwon below:
#################################################################### # TrueType font support thru FreeType #################################################################### HAVE_FREETYPE_SUPPORT = Y INCFTLIB = /usr/local/include LIBFTLIB = /usr/local/lib/libttf.so FREETYPE_FONT_DIR = "/usr/local/microwin/fonts" |
Symbol | DescriptionPurpose |
---|---|
HAVE_FREETYPE_SUPPORT | This symbol controls the conditional compilation of the FreeType code within Microwindows. If set to "Y" then FreeType support will be included. If set to "N" the FreeType support is not compiled in. |
INCFTLIB | This symbol defines the path to the FreeType include files (on the development system). This path will be added to the include file search path during compilation of Microwindows. |
LIBFTLIB | This symbol defines the path to the FreeType library files (on th development system). This path will be added to the include file search path during linking of Microwindows. |
FREETYPE_FONT_DIR | This symbol defines the path to the TrueType fonts on the target system. When you setup your target system you will use this directory on the target system to hold the TrueType fonts. |
After you modify the config file, re-build and re-install Microwindows.
Create a directory "/usr/local/microwin/fonts/" on your target machine to hold your TrueType fonts. When you get some TrueType fonts, you will put the *.ttf files in this directory.
![]() | This directory must match the directory that you specified with the symbol FREETYPE_FONT_DIR in your Microwindows configuration file. |
You need to pay attention to the license on the TrueType fonts that you plan to use. For quick evaluation purposes you can grab some TrueType fonts from the nearest Windows machine. But you should not use these font on a production system unless you get the proper permissions from the copyright holders. You can get some TrueType fonts from the following sites. If you do a quick seach on the web, dozens of additional sites offering free TrueType fonts will show up.
ftp://microwindows.censoft.com/pub/microwindows/microwindows-fonts-truetype-0.89pre2.tar.gz |
http://www.microsoft.com/typography/fontpack/default.htm |