HPDF-1.4.10: Generation of PDF documents

Copyright(c) 2006-2016 alpheccar.org
LicenseBSD-style
Maintainermisc@NOSPAMalpheccar.org
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Graphics.PDF.Text

Contents

Description

PDF Text

Synopsis

Text

Types

data PDFFont #

Constructors

PDFFont FontName FontSize 

data PDFText a #

The text monad

Instances

Monad PDFText # 

Methods

(>>=) :: PDFText a -> (a -> PDFText b) -> PDFText b #

(>>) :: PDFText a -> PDFText b -> PDFText b #

return :: a -> PDFText a #

fail :: String -> PDFText a #

Functor PDFText # 

Methods

fmap :: (a -> b) -> PDFText a -> PDFText b #

(<$) :: a -> PDFText b -> PDFText a #

Applicative PDFText # 

Methods

pure :: a -> PDFText a #

(<*>) :: PDFText (a -> b) -> PDFText a -> PDFText b #

(*>) :: PDFText a -> PDFText b -> PDFText b #

(<*) :: PDFText a -> PDFText b -> PDFText a #

MonadWriter Builder PDFText # 

Methods

writer :: (a, Builder) -> PDFText a #

tell :: Builder -> PDFText () #

listen :: PDFText a -> PDFText (a, Builder) #

pass :: PDFText (a, Builder -> Builder) -> PDFText a #

type UnscaledUnit = PDFFloat #

Unscaled unit (not scaled by the font size)

Functions

drawText :: PDFText a -> Draw a #

Draw a text in the draw monad

text :: PDFFont -> PDFFloat -> PDFFloat -> PDFString -> PDFText () #

Utility function to quickly display one line of text

toPDFString :: String -> PDFString #

Create a PDF string from an Haskell one

startNewLine :: PDFText () #

Start a new line (leading value must have been set)

displayText :: PDFString -> PDFText () #

Display some text

textStart :: PDFFloat -> PDFFloat -> PDFText () #

Set position for the text beginning

setFont :: PDFFont -> PDFText () #

Select a font to use

leading :: UnscaledUnit -> PDFText () #

Set leading value

charSpace :: UnscaledUnit -> PDFText () #

Set the additional char space

wordSpace :: UnscaledUnit -> PDFText () #

Set the additional word space

textScale :: PDFFloat -> PDFText () #

Set scaling factor for text

renderMode :: TextMode -> PDFText () #

Choose the text rendering mode

rise :: UnscaledUnit -> PDFText () #

Set the rise value

setTextMatrix :: Matrix -> PDFText () #

Set the text transformation matrix

ripText #

Arguments

:: PDFFont

Font

-> PDFString

String

-> [(PDFFloat, Char)]

List of chars and char width taking into account kerning