HPDF-1.6.2: Generation of PDF documents
Copyright(c) 2006-2016 alpheccar.org
LicenseBSD-style
Maintainermisc@NOSPAMalpheccar.org
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Graphics.PDF.Text

Description

PDF Text

Synopsis

Text

Types

data PDFFont Source #

Constructors

PDFFont AnyFont FontSize 

Instances

Instances details
Eq PDFFont Source # 
Instance details

Defined in Graphics.PDF.Fonts.Font

Methods

(==) :: PDFFont -> PDFFont -> Bool #

(/=) :: PDFFont -> PDFFont -> Bool #

Ord PDFFont Source # 
Instance details

Defined in Graphics.PDF.Fonts.Font

data PDFText a Source #

The text monad

Instances

Instances details
Applicative PDFText Source # 
Instance details

Defined in Graphics.PDF.Text

Methods

pure :: a -> PDFText a #

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

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

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

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

Functor PDFText Source # 
Instance details

Defined in Graphics.PDF.Text

Methods

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

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

Monad PDFText Source # 
Instance details

Defined in Graphics.PDF.Text

Methods

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

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

return :: a -> PDFText a #

MonadWriter Builder PDFText Source # 
Instance details

Defined in Graphics.PDF.Text

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 Source #

Unscaled unit (not scaled by the font size)

Functions

drawText :: PDFText a -> Draw a Source #

Draw a text in the draw monad

text :: PDFFont -> PDFFloat -> PDFFloat -> Text -> PDFText () Source #

Utility function to quickly display one line of text

startNewLine :: PDFText () Source #

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

displayGlyphs :: PDFGlyph -> PDFText () Source #

Display glyphs

displayText :: Text -> PDFText () Source #

Display text

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

Set position for the text beginning

setFont :: PDFFont -> PDFText () Source #

Select a font to use

leading :: UnscaledUnit -> PDFText () Source #

Set leading value

charSpace :: UnscaledUnit -> PDFText () Source #

Set the additional char space

wordSpace :: UnscaledUnit -> PDFText () Source #

Set the additional word space

textScale :: PDFFloat -> PDFText () Source #

Set scaling factor for text

renderMode :: TextMode -> PDFText () Source #

Choose the text rendering mode

rise :: UnscaledUnit -> PDFText () Source #

Set the rise value

setTextMatrix :: Matrix -> PDFText () Source #

Set the text transformation matrix

pdfGlyph :: PDFFont -> Text -> PDFGlyph Source #

glyph :: GlyphCode -> PDFGlyph Source #