load_font man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

load_font(3)			Allegro manual			  load_font(3)

NAME
       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 structures
       (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  cus‐
       tom  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(3),	load_bitmap(3),	     load_dat_font(3),
       load_bios_font(3),     load_grx_font(3),	     load_grx_or_bios_font(3),
       load_bitmap_font(3), load_txt_font(3), destroy_font(3), exfont(3)

Allegro				 version 4.4.2			  load_font(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net