 
 class Text: Item {
     static var fonts: [String: String] = Dictionary()
-    
+    static var defaultFont = "Helvetica"
+
     override class func register() {
         onAction(.createText) {
             save(item: Text())
         }
-        
+
         onAction(.setText) {
             (item: Text, val: String) in
             item.labelView.text = val
         }
-        
+
         onAction(.setTextWrap) {
-            (item: Text, val: Bool) in ()
+            (item: Text, val: Bool) in
+            item.wrap = val
         }
-        
+
         onAction(.updateTextContentSize) {
             (item: Text) in
             item.pushContentSize()
         }
-        
+
         onAction(.setTextColor) {
             (item: Text, val: UIColor) in
             item.labelView.textColor = val
         }
-        
+
         onAction(.setTextLineHeight) {
             (item: Text, val: CGFloat) in
             item.lineHeight = val
         }
-        
+
         onAction(.setTextFontFamily) {
             (item: Text, val: String) in
-            item.fontFamily = val
+            item.fontFamily = fonts[val] ?? defaultFont
         }
-        
+
         onAction(.setTextFontPixelSize) {
             (item: Text, val: CGFloat) in
             item.fontPixelSize = val
         }
-        
+
         onAction(.setTextFontWordSpacing) {
             (item: Text, val: CGFloat) in ()
         }
-        
+
         onAction(.setTextFontLetterSpacing) {
             (item: Text, val: CGFloat) in ()
         }
-        
+
         onAction(.setTextAlignmentHorizontal) {
             (item: Text, val: String) in
             switch val {

    }

    private func pushContentSize() {
        pushAction(.textSize, labelView.intrinsicContentSize.width, labelView.intrinsicContentSize.height)
    }
}


                item.labelView.textAlignment = .left
            }
        }

        onAction(.setTextAlignmentVertical) {
            (item: Text, val: String) in ()
        }

        onAction(.loadFont) {
            (reader: Reader) in
            Text.loadFont(name: reader.getString(), source: reader.getString())
        }
    }

    var wrap = false;

    var lineHeight: CGFloat = 1 {
        didSet {
            updateFont()
        }
    }

    var fontFamily = defaultFont {
        didSet {
            updateFont()
        }
    }

    var fontPixelSize: CGFloat = 14 {
        didSet {
            updateFont()
