HPDF-1.2: Generation of PDF documentsContentsIndex
Graphics.PDF.Text
Portabilityportable
Stabilityexperimental
Maintainermisc@NOSPAMalpheccar.org
Contents
Text
Types
Functions
Description
PDF Text
Synopsis
data PDFFont = PDFFont FontName FontSize
data FontName
= Helvetica
| Helvetica_Bold
| Helvetica_Oblique
| Helvetica_BoldOblique
| Times_Roman
| Times_Bold
| Times_Italic
| Times_BoldItalic
| Courier
| Courier_Bold
| Courier_Oblique
| Courier_BoldOblique
| Symbol
| ZapfDingbats
data TextMode
= FillText
| StrokeText
| FillAndStrokeText
| InvisibleText
| FillTextAndAddToClip
| StrokeTextAndAddToClip
| FillAndStrokeTextAndAddToClip
| AddToClip
data PDFText a
type UnscaledUnit = PDFFloat
drawText :: PDFText a -> Draw a
text :: PDFFont -> PDFFloat -> PDFFloat -> PDFString -> PDFText ()
toPDFString :: String -> PDFString
startNewLine :: PDFText ()
displayText :: PDFString -> PDFText ()
textStart :: PDFFloat -> PDFFloat -> PDFText ()
setFont :: PDFFont -> PDFText ()
leading :: UnscaledUnit -> PDFText ()
charSpace :: UnscaledUnit -> PDFText ()
wordSpace :: UnscaledUnit -> PDFText ()
textScale :: PDFFloat -> PDFText ()
renderMode :: TextMode -> PDFText ()
rise :: UnscaledUnit -> PDFText ()
setTextMatrix :: Matrix -> PDFText ()
textWidth :: PDFFont -> PDFString -> PDFFloat
getDescent :: PDFFont -> PDFFloat
getHeight :: PDFFont -> PDFFloat
ripText :: PDFFont -> PDFString -> [(PDFFloat, Char)]
charWidth :: PDFFont -> Char -> PDFFloat
Text
Types
data PDFFont
Constructors
PDFFont FontName FontSize
show/hide Instances
data FontName
Constructors
Helvetica
Helvetica_Bold
Helvetica_Oblique
Helvetica_BoldOblique
Times_Roman
Times_Bold
Times_Italic
Times_BoldItalic
Courier
Courier_Bold
Courier_Oblique
Courier_BoldOblique
Symbol
ZapfDingbats
show/hide Instances
data TextMode
Rendering mode for text display
Constructors
FillText
StrokeText
FillAndStrokeText
InvisibleText
FillTextAndAddToClip
StrokeTextAndAddToClip
FillAndStrokeTextAndAddToClip
AddToClip
show/hide Instances
data PDFText a
The text monad
show/hide Instances
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
textWidth :: PDFFont -> PDFString -> PDFFloat
getDescent :: PDFFont -> PDFFloat
getHeight :: PDFFont -> PDFFloat
ripText
:: PDFFontFont
-> PDFStringString
-> [(PDFFloat, Char)]List of chars and char width taking into account kerning
charWidth :: PDFFont -> Char -> PDFFloat
Produced by Haddock version 0.8