Class
Lfont
Home
In: locana/l_others.rb
Parent: Object

This class is used for determining the pixel_width and pixel_height of strings when the width and/or height is not supplied with the object. This class also loads and defines a default font when an object does not directly specify a font. This module requires that each GUI Binding implement the following methods:

Methods

default_font, default_font_name, default_font_size, get_font, inspect, new, supported_font_names, to_s,
Attributes

 [R]  font
 [R]  font_id
 [R]  name
Public Class methods
default_font_name() src

This returns the name of the default font. This is called by Lfont.default_font(). If a default_font is specified in a theme, it will take precedence over this method. The default font name is Locana_gui::default_font_name() to let the GUI Binding determine the default font.

default_font_size() src

This returns the size of the default font. This is called by Lfont.default_font(). If a default_font is specified in a theme, it will take precedence over this method. The default font size is Locana_gui::default_font_size() to let the GUI Binding determine the default font size.

default_font() src

Returns the default font when a font is not specified with an object. It calls Lfont.default_font_name and Lfont.default_font_size to determine the default font. If a default_font can is specified in a theme, it will take precedence over this method.

supported_font_names() src

Returns an array of supported font names.

get_font(lfont) src

This always returns an Lfont object. If a Lfont object already exists for lfont, it re-uses it. If not, it creates and returns a new Lfont object.

new(name, lfont) src

Creates a new font. Where font is an array of {name, size, style]:

Public Instance methods
to_s() src
inspect()

Alias for to_s


Seva Software


Thank you for taking the time to visit this web page. I trust you found the information contained in this page useful.
Please email any questions, concerns, or issues with this web site to webmaster@sevasoftware.com.
Please remember Seva Software when your company would benefit from an experienced database architect and software engineer.

http://www.arunadb.org http://www.locana.org http://www.ruby-lang.org http://www.coolwell.org http://www.sevasoftware.com