From fa5f810b20aea2f58faa6a9946945deda48f1ec9 Mon Sep 17 00:00:00 2001 From: Alexander Iljin Date: Thu, 5 Jan 2017 23:30:29 +0300 Subject: [PATCH] pdf.layout: use symbols for authorship --- extra/pdf/layout/layout.factor | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/extra/pdf/layout/layout.factor b/extra/pdf/layout/layout.factor index 3f056348e5..cfb66648f4 100644 --- a/extra/pdf/layout/layout.factor +++ b/extra/pdf/layout/layout.factor @@ -3,8 +3,8 @@ USING: accessors assocs calendar combinators environment fonts formatting fry io io.streams.string kernel literals locals make -math math.order math.ranges pdf.canvas pdf.values pdf.wrap -sequences sequences.extras sorting splitting ui.text +math math.order math.ranges namespaces pdf.canvas pdf.values +pdf.wrap sequences sequences.extras sorting splitting ui.text xml.entities ; FROM: pdf.canvas => draw-text ; @@ -353,14 +353,16 @@ M: table pdf-width "%%EOF" , ] { } make "\n" join ; +SYMBOLS: pdf-producer pdf-author pdf-creator ; + TUPLE: pdf-info title timestamp producer author creator ; : ( -- pdf-info ) pdf-info new now >>timestamp - "Factor" >>producer - "USER" os-env "unknown" or >>author - "created with Factor" >>creator ; + pdf-producer get >>producer + pdf-author get >>author + pdf-creator get >>creator ; M: pdf-info pdf-value [ -- 2.34.1