aosd-0.1.3: Bindings to libaosd, a library for Cairo-based on-screen displays

Graphics.Aosd.Pango

Contents

Synopsis

Base

data Width Source

Constructors

Unlimited

The layout will be as wide as necessary to hold all the lines without wrapping

Width Double

The layout will be wrapped (according to wrapMode) to the given width in Pango units

Instances

textRenderer :: PangoText -> TextRendererSource

Construct a TextConf with most fields set to Nothing

PangoText

data PangoText Source

Plain text or some Pango markup. Suggestion: Use {-# LANGUAGE OverloadedStrings #-}.

pText :: String -> PangoTextSource

Plain text.

pTagSource

Arguments

:: String

Tag name

-> PangoText 
-> PangoText 

Markup tags

pSup :: PangoText -> PangoTextSource

Superscript

pMono :: PangoText -> PangoTextSource

Monospace font

Span shorthands

pSized :: Double -> PangoText -> PangoTextSource

Set font size in points

Standard text combinators

Reexports

data SpanAttribute

These are all the attributes the markSpan function can express.

Constructors

FontDescr String

Choose a font by textual description.

  • Takes a string to completely describe the font, example: FontDescr "Sans Italic 12"
FontFamily String

Specify the family of font to use.

  • Example: FontFamily "Sans"
FontSize Size

Change the size of the current font.

  • The constuctor takes the size in points (pt) or a predefined sizes. Setting the absolute size 12.5pt can be achieved by passing FontSize (SizePoint 12.5) to markSpan. Next to predefined absolute sizes such as SizeSmall the size can be changed by asking for the next larger or smaller front with SizeLarger and SizeSmaller, respectively.
FontStyle FontStyle

Change the slant of the current font.

FontWeight Weight

Change the thickness of the current font.

  • The constructor takes one of the six predefined weights. Most likely to be supported: WeightBold.
FontVariant Variant

Choosing an alternative rendering for lower case letters.

  • The argument VariantSmallCaps will display lower case letters as smaller upper case letters, if this option is available.
FontStretch Stretch

Choose a different width.

  • Takes one of nine font widths, e.g. Pango.WidthExpanded.
FontForeground String

Foreground color.

  • This constructor and FontBackground take both a description of the color to be used for rendering. The name is either a hex code of the form "#RRGGBB" or an X11 color name like "dark olive green".
FontBackground String

Background color.

FontUnderline Underline

Specify underlining of text.

FontRise Double

Specify a vertical displacement.

  • Takes the vertical displacement in em (the width of the 'm' character in the current font).
FontLang Language

Give a hint about the language to be displayed.

  • This hint might help the system rendering a particular piece of text with different fonts that are more suitable for the given language.
FontGravity PangoGravity

Gravity of text, use for ratation.

FontGravityHint PangoGravityHint

Intensity of gravity.

Instances

data LayoutAlignment

Enumerate to which side incomplete lines are flushed.

data LayoutWrapMode

Enumerates how a line can be wrapped.

WrapWholeWords
Breaks lines only between words.
  • This variant does not guarantee that the requested width is not exceeded. A word that is longer than the paragraph width is not split.
WrapAnywhere
Break lines anywhere.
WrapPartialWords
Wrap within a word if it is the only one on this line.
  • This option acts like WrapWholeWords but will split a word if it is the only one on this line and it exceeds the specified width.

Instances

type TabPosition = (Double, TabAlign)

A Tab position.

data Size

Define attributes for FontSize.

Instances

sRGB :: (Ord b, Floating b) => b -> b -> b -> Colour b

Construct a colour from an sRGB specification. Input components are expected to be in the range [0..1].