GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
merge_fonts(3) Allegro manual merge_fonts(3)

merge_fonts - Merges two fonts into one font. Allegro game programming library.

#include <allegro.h>

FONT *merge_fonts(FONT *f1, FONT *f2)

This function merges the character ranges from two fonts and returns a new font containing all characters in the old fonts. In general, you cannot merge fonts of different types (eg, TrueType fonts and bitmapped fonts), but as a special case, this function can promote a monochrome bitmapped font to a color font and merge those. Example:

   FONT *myfont;
   FONT *myfancy_font;
   FONT *lower_range;
   FONT *upper_range;
   FONT *capitals;
   FONT *combined_font;
   FONT *tempfont;
   ...
   /* Create a font that contains the capitals from  */
   /* the fancy font but other characters from myfont */
   lower_range = extract_font_range(myfont, -1, 'A'-1);
   upper_range = extract_font_range(myfont, 'Z'+1, -1);
   capitals = extract_font_range(myfancy_font, 'A', 'Z');
   
   tempfont = merge_fonts(lower_range, capitals);
   combined_font = merge_fonts(tempfont, upper_range);
   
   /* Clean up temporary fonts */
   destroy_font(lower_range);
   destroy_font(upper_range);
   destroy_font(capitals);
   destroy_font(tempfont);

Returns a pointer to the new font or NULL on error. Remember that you are responsible for destroying the font when you are finished with it to avoid memory leaks.

extract_font_range(3), is_trans_font(3), is_color_font(3), is_mono_font(3), exfont(3)
version 4.4.3 Allegro

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.