]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/core-text/core-text.factor
Merge branch 'master' into startup
[factor.git] / basis / core-text / core-text.factor
index d672815cbeae049bb64b8964a59ba7211ffdd3bb..7af6792e79845d8d14517139ba4d86f0b66513b7 100644 (file)
@@ -112,35 +112,34 @@ TUPLE: line < disposable line metrics image loc dim ;
     [
         line new-disposable
 
-        [let* | open-font [ font cache-font ]
-                line [ string open-font font foreground>> <CTLine> |CFRelease ]
-
-                rect [ line line-rect ]
-                (loc) [ rect origin>> CGPoint>loc ]
-                (dim) [ rect size>> CGSize>dim ]
-                (ext) [ (loc) (dim) v+ ]
-                loc [ (loc) [ floor ] map ]
-                ext [ (loc) (dim) [ + ceiling ] 2map ]
-                dim [ ext loc [ - >integer 1 max ] 2map ]
-                metrics [ open-font line compute-line-metrics ] |
-
-            line >>line
-
-            metrics >>metrics
-
-            dim [
-                {
-                    [ font dim fill-background ]
-                    [ loc dim line string fill-selection-background ]
-                    [ loc set-text-position ]
-                    [ [ line ] dip CTLineDraw ]
-                } cleave
-            ] make-bitmap-image >>image
-
-            metrics loc dim line-loc >>loc
-
-            metrics metrics>dim >>dim
-        ]
+        font cache-font :> open-font
+        string open-font font foreground>> <CTLine> |CFRelease :> line
+
+        line line-rect :> rect
+        rect origin>> CGPoint>loc :> (loc)
+        rect size>> CGSize>dim :> (dim)
+        (loc) (dim) v+ :> (ext)
+        (loc) [ floor ] map :> loc
+        (loc) (dim) [ + ceiling ] 2map :> ext
+        ext loc [ - >integer 1 max ] 2map :> dim
+        open-font line compute-line-metrics :> metrics
+
+        line >>line
+
+        metrics >>metrics
+
+        dim [
+            {
+                [ font dim fill-background ]
+                [ loc dim line string fill-selection-background ]
+                [ loc set-text-position ]
+                [ [ line ] dip CTLineDraw ]
+            } cleave
+        ] make-bitmap-image >>image
+
+        metrics loc dim line-loc >>loc
+
+        metrics metrics>dim >>dim
     ] with-destructors ;
 
 M: line dispose* line>> CFRelease ;