class

Pixelfont::Font

Inherits Reference < Object

Constructors

new(path : String)
Source
new(io : IO)
Source
new(graphemes : Hash(Char, Pixelfont::Grapheme), properties : Pixelfont::Properties = Properties::None)
Source

Instance methods

draw(string : String, x = 0, y = 0, fixed_width = false, &block : Int32, Int32, Bool -> )

Provides (x, y) cordinates and if the pixel is on

font.draw("Hello, World!") do |px, py, bit|
  my_screen[px, py] = RGB.new(0, 0, 0) if bit
end
Source
graphemes
Source
height_of(string : String)
Source
leading
Source
leading=(leading : Int16)
Source
line_height
Source
line_height=(line_height : UInt16)
Source
properties
Source
properties=(properties : Properties)
Source
set_width

em width or set width of the font

Source
to_s(string : String, fore : Char = '█', back : Char = ' ', fixed_width = false)
Source
tracking
Source
tracking=(tracking : Int16)
Source
width_of(string : String, fixed_width = false)
Source