Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: bf877c423d
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (21 sloc) 0.584 kB
module FontVariationDescription
class Item
def initialize(index, property, values)
@index = index
@property = property
@values = values
end
def compact(output, value)
match = @values.find { |v| value == v[1] }
output[@index] = match[0] if match
end
def expand(output, value, join_property=true)
match = @values.find { |v| value == v[0] }
if join_property
output[@index] = [@property, match[1]].join(':') if match
else
output[@index] = [@property, match[1]] if match
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.