LavishGUI:Fonts

From Lavish Software Wiki
Revision as of 03:33, 6 December 2005 by Beefalo (talk | contribs)
Jump to navigation Jump to search

Introduction

What is a font?

A LavishGUI font is a special texture separated into 256 portions (one for each ASCII character) to be used by LGUI elements for displaying text. Fonts can be fixed width (such as FixedSys or Terminal) or variable width (Arial, etc), though some element types require fixed width fonts (such as the console element type).

Creating Fonts

Fonts are essentially a texture with all 256 ASCII characters shown, and a list of where each of those characters appears on the image. Therefore, defining a font is much the same as defining a texture, except you define 256 rectangles instead of 1. This is an easy task for fixed fonts, where the characters appear uniformly on the image, and a shortcut is given here to do so.

The image used should be 16 characters wide, and 16 characters high, ideally no larger than 256x256. You should use at least 1 pixel of padding between characters to avoid extra parts lying around when it comes time to display the text.

Attributes

  • Name
  • Filename
  • ColorKey

Properties

  • Fixed
  • BaseHeight
  • Characters

Characters

Attributes

Character

Attributes

Properties

Using Fonts

Properties

  • Name
Name of font to use. If the font does not exist, a default font will be selected
  • Color
Color to apply to the font
  • Size
Height, in pixels, to use for the font. The width will be scaled based on this Size compared to the Base Height given in the font definition

See Also

LavishGUI