HPDF-1.4: Generation of PDF documentsSource codeContentsIndex
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 Source
Constructors
PDFFont FontName FontSize
show/hide Instances
data FontName Source
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 Source
Rendering mode for text display
Constructors
FillText
StrokeText
FillAndStrokeText
InvisibleText
FillTextAndAddToClip
StrokeTextAndAddToClip
FillAndStrokeTextAndAddToClip
AddToClip
show/hide Instances
data PDFText a Source
The text monad
show/hide Instances
type UnscaledUnit = PDFFloatSource
Unscaled unit (not scaled by the font size)
Functions
drawText :: PDFText a -> Draw aSource
Draw a text in the draw monad
text :: PDFFont -> PDFFloat -> PDFFloat -> PDFString -> PDFText ()Source
Utility function to quickly display one line of text
toPDFString :: String -> PDFStringSource
Create a PDF string from an Haskell one
startNewLine :: PDFText ()Source
Start a new line (leading value must have been set)
displayText :: PDFString -> PDFText ()Source
Display some 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
textWidth :: PDFFont -> PDFString -> PDFFloatSource
getDescent :: PDFFont -> PDFFloatSource
getHeight :: PDFFont -> PDFFloatSource
ripTextSource
:: PDFFontFont
-> PDFStringString
-> [(PDFFloat, Char)]List of chars and char width taking into account kerning
charWidth :: PDFFont -> Char -> PDFFloatSource
Produced by Haddock version 2.3.0