diagrams-rasterific-1.4: Rasterific backend for diagrams.

Copyright(c) 2015 diagrams-rasterific team (see LICENSE)
LicenseBSD-style (see LICENSE)
Maintainerdiagrams-discuss@googlegroups.com
Safe HaskellNone
LanguageHaskell2010

Diagrams.Backend.Rasterific.Text

Description

Experimental module to create text with an envelope and trace. The texterifc functions build diagrams with text size of local 1 and a s specified slant and weight. The size should be changed only with the scale functions and changing the slant and/or weight after the text has benn created can result in an slightly incorrect envelope.

Synopsis

Documentation

texterific' :: (TypeableFloat n, Renderable (Text n) b) => FontSlant -> FontWeight -> String -> QDiagram b V2 n Any Source #

Create a primitive text diagram from the given FontSlant, FontWeight, and string, with baseline alignment, envelope and trace based on the BoundingBox of the text.

texterific :: (TypeableFloat n, Renderable (Text n) b) => String -> QDiagram b V2 n Any Source #

Create a primitive text diagram from the given string, with baseline alignment, envelope and trace based on the BoundingBox of the text. Designed to be a replacement for the function text in Diagrams.TwoD.Text.

fromFontStyle :: FontSlant -> FontWeight -> Font Source #

Get an OpenSans font with the given FontSlant and FontWeight.

textBoundingBox :: RealFloat n => Font -> PointSize -> String -> BoundingBox V2 n Source #

Get the BoundingBox for some font with the origin at the start of the baseline.