Module: LiteRGSS::Fonts

Defined in:
LiteRGSS.rb.yard.rb,
scripts/00000 Dependencies/00001 LiteRGSS2/00009 Fonts.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)


777
778
779
# File 'LiteRGSS.rb.yard.rb', line 777

def self.define_fill_color(font_id, color)

end

.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)


784
785
786
# File 'LiteRGSS.rb.yard.rb', line 784

def self.define_outline_color(font_id, color)

end

.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)


791
792
793
# File 'LiteRGSS.rb.yard.rb', line 791

def self.define_shadow_color(font_id, color)

end

.get_default_size(font_id) ⇒ Integer

Retrieve the default size of a font

Parameters:

  • font_id (Integer)

    the ID of the font

Returns:



797
798
799
# File 'LiteRGSS.rb.yard.rb', line 797

def self.get_default_size(font_id)

end

.get_fill_color(font_id) ⇒ Color

Retrieve the fill color of a font

Parameters:

  • font_id (Integer)

    the ID of the font

Returns:



803
804
805
# File 'LiteRGSS.rb.yard.rb', line 803

def self.get_fill_color(font_id)

end

.get_outline_color(font_id) ⇒ Color

Retrieve the outline color of a font

Parameters:

  • font_id (Integer)

    the ID of the font

Returns:



809
810
811
# File 'LiteRGSS.rb.yard.rb', line 809

def self.get_outline_color(font_id)

end

.get_shadow_color(font_id) ⇒ Color

Retrieve the shadow color of a font

Parameters:

  • font_id (Integer)

    the ID of the font

Returns:



815
816
817
# File 'LiteRGSS.rb.yard.rb', line 815

def self.get_shadow_color(font_id)

end

.line_height(font_id) ⇒ Integer

Get the line height for a specific font

Parameters:

  • font_id (Integer)

    ID of the font

Returns:



17
18
19
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/00009 Fonts.rb', line 17

def line_height(font_id)
  @line_heights[font_id] || 16
end

.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)


763
764
765
# File 'LiteRGSS.rb.yard.rb', line 763

def self.load_font(font_id, filename)

end

.load_line_height(font_id, line_height)

Load a line height for a specific font

Parameters:

  • font_id (Integer)

    ID of the font

  • line_height (Integer)

    new line height for the font



10
11
12
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/00009 Fonts.rb', line 10

def load_line_height(font_id, line_height)
  @line_heights[font_id] = line_height
end

.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)


770
771
772
# File 'LiteRGSS.rb.yard.rb', line 770

def self.set_default_size(font_id, size)

end