Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

merge_fonts(3alleg4) [debian man page]

merge_fonts(3alleg4)						  Allegro manual					      merge_fonts(3alleg4)

merge_fonts - Merges two fonts into one font. Allegro game programming library. SYNOPSIS
#include <allegro.h> FONT *merge_fonts(FONT *f1, FONT *f2) DESCRIPTION
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 mono- chrome 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); RETURN VALUE
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. SEE ALSO
extract_font_range(3alleg4), is_trans_font(3alleg4), is_color_font(3alleg4), is_mono_font(3alleg4), exfont(3alleg4) Allegro version 4.4.2 merge_fonts(3alleg4)

Check Out this Related Man Page

load_font(3alleg4)						  Allegro manual						load_font(3alleg4)

load_font - Loads a font from a file. Allegro game programming library. SYNOPSIS
#include <allegro.h> FONT *load_font(const char *filename, RGB *pal, void *param); DESCRIPTION
Loads a font from a file. At present, this supports loading fonts from a GRX format .fnt file, a 8x8 or 8x16 BIOS format .fnt file, a datafile or any bitmap format that can be loaded by load_bitmap(). If the font contains palette information, then the palette is returned in the second parameter, which should be an array of 256 RGB struc- tures (a PALETTE). The pal argument may be NULL. In this case, the palette data, if present, is simply not returned. The third parameter can be used to pass specific information to a custom loader routine. Normally, you can just leave this as NULL. Note that another way of loading fonts is embedding them into a datafile and using the datafile related functions. Example: FONT *myfont; PALETTE palette; ... myfont = load_font("my_font.pcx", palette, NULL); if (!myfont) abort_on_error("Couldn't load font!"); ... textout_centre_ex(screen, myfont, "This is my own pretty font!", SCREEN_W / 2, SCREEN_H / 2, white, black); ... destroy_font(myfont); RETURN VALUE
Returns a pointer to the font or NULL on error. Remember that you are responsible for destroying the font when you are finished with it to avoid memory leaks. SEE ALSO
register_font_file_type(3alleg4), load_bitmap(3alleg4), load_dat_font(3alleg4), load_bios_font(3alleg4), load_grx_font(3alleg4), load_grx_or_bios_font(3alleg4), load_bitmap_font(3alleg4), load_txt_font(3alleg4), destroy_font(3alleg4), exfont(3alleg4) Allegro version 4.4.2 load_font(3alleg4)
Man Page

6 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Sys Administration

What happend to the Administration board, How come no one posts there? (1 Reply)
Discussion started by: tovsky
1 Replies

2. UNIX for Dummies Questions & Answers

Oracle 7

Hello, does anybody know where I can download a copy of ORACLE 7 or Personal ORACLE 7 ? regards, :D (2 Replies)
Discussion started by: shaft120
2 Replies

3. Shell Programming and Scripting

sed situation

Hi, I'm looking for someone who can think in sed. Basically, I need the trailing characters on every line in a file to be deleted. These characters are all in capitals, and always follow a number, but they often vary in number For instance, on the line: 2006_10_9_p20_TALK I'd want to... (4 Replies)
Discussion started by: Laurel Maury
4 Replies

4. AIX

Install additional fonts ?

Hi, I have two fonts installed on my AIX machine: FONT FILE GLYPH FONT ID NAME SIZE ENCODING ==== ============== ===== ========= 0 Erg22.iso1.snf 12x30 ISO8859-1 1 Erg11.iso1.snf 8x15 ISO8859-1 I want to install more, how to obtain available fonts list ? What filesets I must install ?... (0 Replies)
Discussion started by: vilius
0 Replies

5. What is on Your Mind?

Categorisation of fonts

This one thing that has been on my mind for at least a decade. At times I need a font for a specific purpose, but there is no designer around to guide me. I go to sites that offer fonts and locate one that I think is suitable. There seems to be no common categorisation however, that offers criteria... (5 Replies)
Discussion started by: figaro
5 Replies

6. What is on Your Mind?

Custom Fonts for Usernames, Buttons, Other Short Phrases

I'm thinking to replace many of the buttons like "Reply" or "Thank You" with custom, modern, space age'e looking fonts. When I was game-engine programming in Unity last year, I used fonts like "Terminator" and "Neuropol" and "Space Age" and "Jupiter". At the moment, I cannot get "Neuropol" to... (2 Replies)
Discussion started by: Neo
2 Replies