| Copyright | (c) 2006-2016 alpheccar.org |
|---|---|
| License | BSD-style |
| Maintainer | misc@NOSPAMalpheccar.org |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Graphics.PDF.Text
Description
PDF Text
Synopsis
- data PDFFont = PDFFont FontName FontSize
- data FontName
- data TextMode
- 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
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 |
Instances
| Enum FontName # | |
Defined in Graphics.PDF.Resources | |
| Eq FontName # | |
| Ord FontName # | |
Defined in Graphics.PDF.Resources | |
| Show FontName # | |
Rendering mode for text display
Constructors
| FillText | |
| StrokeText | |
| FillAndStrokeText | |
| InvisibleText | |
| FillTextAndAddToClip | |
| StrokeTextAndAddToClip | |
| FillAndStrokeTextAndAddToClip | |
| AddToClip |
Instances
| Enum TextMode # | |
Defined in Graphics.PDF.Text | |
| Eq TextMode # | |
| Ord TextMode # | |
Defined in Graphics.PDF.Text | |
The text monad
type UnscaledUnit = PDFFloat #
Unscaled unit (not scaled by the font size)
Functions
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
leading :: UnscaledUnit -> PDFText () #
Set leading value
charSpace :: UnscaledUnit -> PDFText () #
Set the additional char space
wordSpace :: UnscaledUnit -> PDFText () #
Set the additional word space
renderMode :: TextMode -> PDFText () #
Choose the text rendering mode
rise :: UnscaledUnit -> PDFText () #
Set the rise value
setTextMatrix :: Matrix -> PDFText () #
Set the text transformation matrix
getDescent :: PDFFont -> PDFFloat #