Example: Load Fastgraph/Fonts Font File from FGI Library

Example FGIW6 shows how to use a Fastgraph/Fonts font file stored in an FGI library (this example requires Fastgraph/Fonts to link). Our example FGI library includes BRODWY18.FGF, the 18-point Broadway font file supplied with Fastgraph/Fonts. In general, we may not know the font file size in advance, so FGIW6 uses fgi_filesize() to determine its size. It then allocates a dynamic memory block of that size and calls fgi_readnext() to read the font file into that buffer. Next, the program calls the Fastgraph/Fonts function fgf_define() to make the font data available to Fastgraph/Fonts. From that point, we can use the font as if we had loaded it directly from a font file with fgf_load().

C/C++ version

C++Builder version

Delphi version

Visual Basic version

<< Prev

Next >>

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.