pdf.layout: use symbols for authorship

char-rename
Alexander Iljin 2017-01-05 23:30:29 +03:00 committed by John Benediktsson
parent d5c555462b
commit fa5f810b20
1 changed files with 7 additions and 5 deletions

View File

@ -3,8 +3,8 @@
USING: accessors assocs calendar combinators environment fonts USING: accessors assocs calendar combinators environment fonts
formatting fry io io.streams.string kernel literals locals make formatting fry io io.streams.string kernel literals locals make
math math.order math.ranges pdf.canvas pdf.values pdf.wrap math math.order math.ranges namespaces pdf.canvas pdf.values
sequences sequences.extras sorting splitting ui.text pdf.wrap sequences sequences.extras sorting splitting ui.text
xml.entities ; xml.entities ;
FROM: pdf.canvas => draw-text ; FROM: pdf.canvas => draw-text ;
@ -353,14 +353,16 @@ M: table pdf-width
"%%EOF" , "%%EOF" ,
] { } make "\n" join ; ] { } make "\n" join ;
SYMBOLS: pdf-producer pdf-author pdf-creator ;
TUPLE: pdf-info title timestamp producer author creator ; TUPLE: pdf-info title timestamp producer author creator ;
: <pdf-info> ( -- pdf-info ) : <pdf-info> ( -- pdf-info )
pdf-info new pdf-info new
now >>timestamp now >>timestamp
"Factor" >>producer pdf-producer get >>producer
"USER" os-env "unknown" or >>author pdf-author get >>author
"created with Factor" >>creator ; pdf-creator get >>creator ;
M: pdf-info pdf-value M: pdf-info pdf-value
[ [