]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/pdf/layout/layout.factor
factor: words -> split-words, lines -> split-lines, fix errors
[factor.git] / extra / pdf / layout / layout.factor
index 990b0272694bbae52fb4fcefbb75d616cadbe0ad..c8e8db2851d2f55614573c195e63ee064960786e 100644 (file)
@@ -108,7 +108,7 @@ M: p pdf-render
 
 M: p pdf-width
     [ style>> set-style ] keep
-    [ font>> ] [ string>> ] bi* lines
+    [ font>> ] [ string>> ] bi* split-lines
     [ dupd text-width ] map nip supremum ;
 
 
@@ -141,7 +141,7 @@ M: text pdf-render
 
 M: text pdf-width
     [ style>> set-style ] keep
-    [ font>> ] [ string>> ] bi* lines
+    [ font>> ] [ string>> ] bi* split-lines
     [ dupd text-width ] map nip supremum ;
 
 
@@ -318,7 +318,7 @@ M: table pdf-width
         "/Type /Catalog"
         "/Pages 15 0 R"
         ">>"
-    } unlines ;
+    } join-lines ;
 
 : pdf-pages ( n -- str )
     [
@@ -332,7 +332,7 @@ M: table pdf-width
             "/Kids [ " "]" surround ,
         ] bi
         ">>" ,
-    ] { } make unlines ;
+    ] { } make join-lines ;
 
 : pdf-page ( n -- page )
     [
@@ -347,7 +347,7 @@ M: table pdf-width
         "/F10 12 0 R /F11 13 0 R /F12 14 0 R" ,
         ">> >>" ,
         ">>" ,
-    ] { } make unlines ;
+    ] { } make join-lines ;
 
 : pdf-trailer ( objects -- str )
     [
@@ -366,7 +366,7 @@ M: table pdf-width
         "startxref" ,
         [ length 1 + ] map-sum 9 + "%d" sprintf ,
         "%%EOF" ,
-    ] { } make unlines ;
+    ] { } make join-lines ;
 
 SYMBOLS: pdf-producer pdf-author pdf-creator ;
 
@@ -425,7 +425,7 @@ TUPLE: pdf info pages fonts ;
     dup length [1,b] zip [ first2 pdf-object ] map ;
 
 : objects>pdf ( objects -- str )
-    [ unlines "\n" append "%PDF-1.4\n" ]
+    [ join-lines "\n" append "%PDF-1.4\n" ]
     [ pdf-trailer ] bi surround ;
 
 ! Rename to pdf>string, have it take a <pdf> object?