       when "string" then result[field] = new String({obj: model, attr: field})
 
   return result
-
 
 visuals = (model, attr="visuals") ->
   result = {}

      values: "top middle bottom alphabetic hanging"

  warm_cache: (source) ->
    super(source, ["color", "alpha", "align", "baseline"])
    if (@font.fixed_value? and @font_size.fixed_value? and
        @font_style.fixed_value?)
      @cache["font"] = @font_value()
    else
      @cache["font_array"] = @font_array(source)

  cache_select: (name, i) ->
    if name == "font"
      if @font.fixed_value? and @font_size.fixed_value? and @font_style.fixed_value?
        @cache.font = @font_value()
      else
        @cache.font = @cache.font_array[i]
      return
    super(name, i)

  font_value: () ->
    font       = @font.value()
    font_size  = @font_size.value()
    font_style = @font_style.value()
    return font_style + " " + font_size + " " + font

  font_array: (source) ->
    font       = @font.array(source)
    font_size  = @font_size.array(source)
    font_style = @font_style.array(source)
    result = []
    for i in [0...font.length]
      result.push(font_style[i] + " " + font_size[i] + " " + font[i])
    return result

  set_value: (ctx) ->
    ctx.font         = @font_value()

  initialize: (attrs, options) ->
    @cache = {}
    super(attrs, options)

  warm_cache: (source, attrs) ->
    for attr in attrs
