Class: UIC::Property::Font
- Inherits:
-
UIC::Property
- Object
- UIC::Property
- UIC::Property::Font
- Defined in:
- lib/ruic/attributes.rb
Constant Summary
Constants inherited from UIC::Property
Color, Float2, FontSize, Import, Mesh, MultiLineString, Renderable, Rotation, StringListOrInt
Instance Attribute Summary
Attributes inherited from UIC::Property
Instance Method Summary collapse
-
#get(asset, slide) ⇒ Object
TODO: how to support non-ttf fonts?.
- #set(asset, new_value, slide_name_or_index) ⇒ Object
Methods inherited from UIC::Property
#description, #formal, #initialize, #inspect, #max, #min, #name, #type
Constructor Details
This class inherits a constructor from UIC::Property
Instance Method Details
#get(asset, slide) ⇒ Object
TODO: how to support non-ttf fonts?
135 |
# File 'lib/ruic/attributes.rb', line 135 def get(asset,); "fonts/#{super}.ttf"; end |
#set(asset, new_value, slide_name_or_index) ⇒ Object
136 137 138 139 |
# File 'lib/ruic/attributes.rb', line 136 def set(asset,new_value,) # TODO: how to support non-ttf fonts? super( asset, new_value.sub(%r{^\.[/\\]},'').sub(%r{^fonts[/\\]},'').sub(%r{\.ttf$},''), ) end |