Class: FontAwesome::Font
- Inherits:
-
Object
- Object
- FontAwesome::Font
- Includes:
- Singleton
- Defined in:
- lib/font_awesome/font.rb
Constant Summary collapse
- ASCENT =
1569
- DESCENT =
-430
Instance Method Summary collapse
- #ascent ⇒ Object
- #character_outline(hex_code) ⇒ Object
- #character_width(hex_code) ⇒ Object
- #descent ⇒ Object
- #em_size ⇒ Object
Instance Method Details
#ascent ⇒ Object
10 11 12 |
# File 'lib/font_awesome/font.rb', line 10 def ascent ASCENT end |
#character_outline(hex_code) ⇒ Object
26 27 28 |
# File 'lib/font_awesome/font.rb', line 26 def character_outline(hex_code) attribute("d", glyph(hex_code)) end |
#character_width(hex_code) ⇒ Object
22 23 24 |
# File 'lib/font_awesome/font.rb', line 22 def character_width(hex_code) (attribute("horiz-adv-x", glyph(hex_code)) || attribute("horiz-adv-x", "font")).to_i end |
#descent ⇒ Object
14 15 16 |
# File 'lib/font_awesome/font.rb', line 14 def descent DESCENT end |
#em_size ⇒ Object
18 19 20 |
# File 'lib/font_awesome/font.rb', line 18 def em_size attribute("units-per-em", "font-face").to_i end |