Jump to content

Ft2lib

From EDM2
Revision as of 18:52, 25 March 2005 by Simpson 2 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Using Innotek FT2LIB for your own applications

This article is intended to explain how to use the ft2lib ( antialiasing support by innotek InnoTek Font Engine for OS/2 ) in your own applications. It will not discuss in detail how this library works.

Modes of operation

There are 2 ways ftlib can be used from within your application:

  • Intercept all Gpi* API calls, and replace them with ft2lib variants.
  • Use the ft2lib Gpi* API variants within your application directly.

The first has some ease of use advantages over the second. If you replace all you don't have actualy recode your program to use ft2lib, but you simply tell ft2lib to replace intercept all Gpi* calls. The second advanatage of this approach is that on systems without ft2lib installed you application works as well, just without anitaliasing.

Using the second method ofcourse gives you the advantage that you have full control of where ft2lib is used or not. This will allow you to use ft2lib within the WPS without enabling ft2lib for the whole WPS.

Intercept all Gpi* API calls

On netlabs you will find a little ft2lib enablement library: ft2lib enablement package. This pacakge is needed for this sample.I will not outline a complete PM program, since I figure that you know how to do that. this will just contain code snipets on how to do it:

#include <ft2lib.h> //Include the ft2lib functions