Class: UIC::Property::Font

Inherits:
UIC::Property show all
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

#default

Instance Method Summary collapse

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,slide); "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,slide_name_or_index)
	# TODO: how to support non-ttf fonts?
	super( asset, new_value.sub(%r{^\.[/\\]},'').sub(%r{^fonts[/\\]},'').sub(%r{\.ttf$},''), slide_name_or_index )
end