Module: PNG::Font
- Defined in:
- lib/png_font.rb,
lib/font/p04b_03.rb
Defined Under Namespace
Modules: P04B_03
Constant Summary collapse
- VERSION =
'0.0.2'
Class Method Summary collapse
Class Method Details
.character_width(ascii_char, pointsize, font) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/png_font.rb', line 10 def self.character_width(ascii_char, pointsize, font) # TODO Take pointsize into account rightmost_x = 0 font.glyphs[ascii_char].each do |point_set| rightmost_x = [rightmost_x, point_set[0][0], point_set[1][0]].max end rightmost_x rescue # DEBUG ONLY return 0 # nothing...for development only end |