Module: LiteRGSS::Fonts

Defined in:
LiteRGSS.rb

Overview

Module that holds information about text fonts.

You can define fonts loaded from a ttf file, you have to associate a default size, fill color and outline color to the font

You can define outline color and fill_color without defining a font but do not create a text with a font_id using the id of these color, it could raise an error, use load_color instead.

Class Method Summary collapse

Class Method Details

.define_fill_color(font_id, color) ⇒ self

Define the fill color of a font

Parameters:

  • font_id (Integer)

    the ID of the font

  • color (Color)

    the fill color

Returns:

  • (self)

.define_outline_color(font_id, color) ⇒ self

Define the outline color of a font

Parameters:

  • font_id (Integer)

    the ID of the font

  • color (Color)

    the outline color

Returns:

  • (self)

.define_shadow_color(font_id, color) ⇒ self

Define the shadow color of a font (WIP)

Parameters:

  • font_id (Integer)

    the ID of the font

  • color (Color)

    the shadow color

Returns:

  • (self)

.get_default_size(font_id) ⇒ Integer

Retreive the default size of a font

Parameters:

  • font_id (Integer)

    the ID of the font

Returns:

  • (Integer)

.get_fill_color(font_id) ⇒ Color

Retreive the fill color of a font

Parameters:

  • font_id (Integer)

    the ID of the font

Returns:

.get_outline_color(font_id) ⇒ Color

Retreive the outline color of a font

Parameters:

  • font_id (Integer)

    the ID of the font

Returns:

.get_shadow_color(font_id) ⇒ Color

Retreive the shadow color of a font

Parameters:

  • font_id (Integer)

    the ID of the font

Returns:

.load_font(font_id, filename) ⇒ self

Load a ttf

Parameters:

  • font_id (Integer)

    the ID of the font you want to use to recall it in Text

  • filename (String)

    the filename of the ttf file.

Returns:

  • (self)

.set_default_size(font_id, size) ⇒ self

Define the default size of a font

Parameters:

  • font_id (Integer)

    the ID of the font

  • size (Integer)

    the default size

Returns:

  • (self)