pango-0.13.11.0: Binding to the Pango text rendering engine.

Maintainer | gtk2hs-users@lists.sourceforge.net
Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | Safe-Inferred
Language | Haskell98

Graphics.Rendering.Pango.Enums

Description

Enumerations for describing font characteristics.

Synopsis

- type PangoUnit = Double
- pangoScale :: Double
- data Color = Color Word16 Word16 Word16
- data Rectangle = Rectangle Int Int Int Int
- data PangoRectangle = PangoRectangle Double Double Double Double
- data FontMetrics = FontMetrics {
  - ascent :: Double
  - descent :: Double
  - approximateCharWidth :: Double
  - approximateDigitWidth :: Double
  - underlineThickness :: Double
  - underlinePosition :: Double
  - strikethroughThickness :: Double
  - strikethroughPosition :: Double
  }
- data Size
  - = SizePoint Double
  - | SizeUnreadable
  - | SizeTiny
  - | SizeSmall
  - | SizeMedium
  - | SizeLarge
  - | SizeHuge
  - | SizeGiant
  - | SizeSmaller
  - | SizeLarger
- data FontStyle
  - = StyleNormal
  - | StyleOblique
  - | StyleItalic
- data Weight
  - = WeightThin
  - | WeightUltralight
  - | WeightLight
  - | WeightSemilight
  - | WeightBook
  - | WeightNormal
  - | WeightMedium
  - | WeightSemibold
  - | WeightBold
  - | WeightUltrabold
  - | WeightHeavy
  - | WeightUltraheavy
- data Variant
  - = VariantNormal
  - | VariantSmallCaps
  - | VariantAllSmallCaps
  - | VariantPetiteCaps
  - | VariantAllPetiteCaps
  - | VariantUnicase
  - | VariantTitleCaps
- data Stretch
  - = StretchUltraCondensed
  - | StretchExtraCondensed
  - | StretchCondensed
  - | StretchSemiCondensed
  - | StretchNormal
  - | StretchSemiExpanded
  - | StretchExpanded
  - | StretchExtraExpanded
  - | StretchUltraExpanded
- data Underline
  - = UnderlineNone
  - | UnderlineSingle
  - | UnderlineDouble
  - | UnderlineLow
  - | UnderlineError
  - | UnderlineSingleLine
  - | UnderlineDoubleLine
  - | UnderlineErrorLine
- data PangoDirection
  - = PangoDirectionLtr
  - | PangoDirectionRtl
  - | PangoDirectionWeakLtr
  - | PangoDirectionWeakRtl
  - | PangoDirectionNeutral
- data PangoAttribute
  - = AttrLanguage {
    - paStart :: Int
    - paEnd :: Int
    - paLang :: Language
    }
  - | AttrFamily {
    - paStart :: Int
    - paEnd :: Int
    - paFamily :: DefaultGlibString
    }
  - | AttrStyle {
    - paStart :: Int
    - paEnd :: Int
    - paStyle :: FontStyle
    }
  - | AttrWeight {
    - paStart :: Int
    - paEnd :: Int
    - paWeight :: Weight
    }
  - | AttrVariant {
    - paStart :: Int
    - paEnd :: Int
    - paVariant :: Variant
    }
  - | AttrStretch {
    - paStart :: Int
    - paEnd :: Int
    - paStretch :: Stretch
    }
  - | AttrSize {
    - paStart :: Int
    - paEnd :: Int
    - paSize :: Double
    }
  - | AttrAbsSize {
    - paStart :: Int
    - paEnd :: Int
    - paSize :: Double
    }
  - | AttrFontDescription {
    - paStart :: Int
    - paEnd :: Int
    - paFontDescription :: FontDescription
    }
  - | AttrForeground {
    - paStart :: Int
    - paEnd :: Int
    - paColor :: Color
    }
  - | AttrBackground {
    - paStart :: Int
    - paEnd :: Int
    - paColor :: Color
    }
  - | AttrUnderline {
    - paStart :: Int
    - paEnd :: Int
    - paUnderline :: Underline
    }
  - | AttrUnderlineColor {
    - paStart :: Int
    - paEnd :: Int
    - paColor :: Color
    }
  - | AttrStrikethrough {
    - paStart :: Int
    - paEnd :: Int
    - paStrikethrough :: Bool
    }
  - | AttrStrikethroughColor {
    - paStart :: Int
    - paEnd :: Int
    - paColor :: Color
    }
  - | AttrRise {
    - paStart :: Int
    - paEnd :: Int
    - paRise :: Double
    }
  - | AttrShape {
    - paStart :: Int
    - paEnd :: Int
    - paInk :: PangoRectangle
    - paLogical :: PangoRectangle
    }
  - | AttrScale {
    - paStart :: Int
    - paEnd :: Int
    - paScale :: Double
    }
  - | AttrFallback {
    - paStart :: Int
    - paEnd :: Int
    - paFallback :: Bool
    }
  - | AttrLetterSpacing {
    - paStart :: Int
    - paEnd :: Int
    - paLetterSpacing :: Double
    }
  - | AttrGravity {
    - paStart :: Int
    - paEnd :: Int
    - paGravity :: PangoGravity
    }
  - | AttrGravityHint {
    - paStart :: Int
    - paEnd :: Int
    - paGravityHint :: PangoGravityHint
    }
- data EllipsizeMode
  - = EllipsizeNone
  - | EllipsizeStart
  - | EllipsizeMiddle
  - | EllipsizeEnd
- data PangoGravity
  - = PangoGravitySouth
  - | PangoGravityEast
  - | PangoGravityNorth
  - | PangoGravityWest
  - | PangoGravityAuto
- data PangoGravityHint
  - = PangoGravityHintNatural
  - | PangoGravityHintStrong
  - | PangoGravityHintLine
- data Language
- emptyLanguage :: Language
- languageFromString :: GlibString string => string -> IO Language

# Documentation

type PangoUnit = Double Source #

pangoScale :: Double Source #

data Color Source #

Color

- Specifies a color with three integer values for red, green and blue. All values range from 0 (least intense) to 65535 (highest intensity).

Constructors

Color Word16 Word16 Word16 |

#### Instances

Instances details

Show Color Source # |
Instance details Defined in Graphics.Rendering.Pango.Structs Methods showsPrec :: Int -> Color -> ShowS Source # show :: Color -> String Source # showList :: [Color] -> ShowS Source #
Eq Color Source # |
Instance details Defined in Graphics.Rendering.Pango.Structs Methods (==) :: Color -> Color -> Bool Source # (/=) :: Color -> Color -> Bool Source #

data Rectangle Source #

Rectangle

- Specifies x, y, width and height

Constructors

Rectangle Int Int Int Int |

#### Instances

Instances details

Show Rectangle Source # |
Instance details Defined in Graphics.Rendering.Pango.Structs Methods showsPrec :: Int -> Rectangle -> ShowS Source # show :: Rectangle -> String Source # showList :: [Rectangle] -> ShowS Source #
Eq Rectangle Source # |
Instance details Defined in Graphics.Rendering.Pango.Structs Methods (==) :: Rectangle -> Rectangle -> Bool Source # (/=) :: Rectangle -> Rectangle -> Bool Source #

data PangoRectangle Source #

Rectangles describing an area in `Double`s.

- Specifies x, y, width and height

Constructors

PangoRectangle Double Double Double Double |

#### Instances

Instances details

Storable PangoRectangle Source # |

Instance details

Defined in Graphics.Rendering.Pango.Structs

Methods

sizeOf :: PangoRectangle -> Int Source #

alignment :: PangoRectangle -> Int Source #

peekElemOff :: Ptr PangoRectangle -> Int -> IO PangoRectangle Source #

pokeElemOff :: Ptr PangoRectangle -> Int -> PangoRectangle -> IO () Source #

peekByteOff :: Ptr b -> Int -> IO PangoRectangle Source #

pokeByteOff :: Ptr b -> Int -> PangoRectangle -> IO () Source #

peek :: Ptr PangoRectangle -> IO PangoRectangle Source #

poke :: Ptr PangoRectangle -> PangoRectangle -> IO () Source #

Show PangoRectangle Source # |
Instance details Defined in Graphics.Rendering.Pango.Structs Methods showsPrec :: Int -> PangoRectangle -> ShowS Source # show :: PangoRectangle -> String Source # showList :: [PangoRectangle] -> ShowS Source #

data FontMetrics Source #

The characteristic measurements of a font.

- All values are measured in pixels.
- In Pango versions before 1.6 only `ascent`, `descent`, `approximateCharWidth` and `approximateDigitWidth` are available.

Constructors

FontMetrics |

Fields

- ascent :: Double

  The ascent is the distance from the baseline to the logical top of a line of text. (The logical top may be above or below the top of the actual drawn ink. It is necessary to lay out the text to figure where the ink will be.)

- descent :: Double

  The descent is the distance from the baseline to the logical bottom of a line of text. (The logical bottom may be above or below the bottom of the actual drawn ink. It is necessary to lay out the text to figure where the ink will be.)

- approximateCharWidth :: Double

  The approximate character width. This is merely a representative value useful, for example, for determining the initial size for a window. Actual characters in text will be wider and narrower than this.

- approximateDigitWidth :: Double

  The approximate digit width. This is merely a representative value useful, for example, for determining the initial size for a window. Actual digits in text can be wider and narrower than this, though this value is generally somewhat more accurate than `approximateCharWidth`.

- underlineThickness :: Double

  The suggested thickness to draw an underline.

- underlinePosition :: Double

  The suggested position to draw the underline. The value returned is the distance above the baseline of the top of the underline. Since most fonts have underline positions beneath the baseline, this value is typically negative.

- strikethroughThickness :: Double

  The suggested thickness to draw for the strikethrough.

- strikethroughPosition :: Double

  The suggested position to draw the strikethrough. The value returned is the distance above the baseline of the top of the strikethrough.

#### Instances

Instances details

Show FontMetrics Source # |
Instance details Defined in Graphics.Rendering.Pango.Enums Methods showsPrec :: Int -> FontMetrics -> ShowS Source # show :: FontMetrics -> String Source # showList :: [FontMetrics] -> ShowS Source #

data Size Source #

Define attributes for `FontSize`.

Constructors

SizePoint Double |
SizeUnreadable |
SizeTiny |
SizeSmall |
SizeMedium |
SizeLarge |
SizeHuge |
SizeGiant |
SizeSmaller |
SizeLarger |

#### Instances

Instances details

Show Size Source # |
Instance details Defined in Graphics.Rendering.Pango.Enums Methods showsPrec :: Int -> Size -> ShowS Source # show :: Size -> String Source # showList :: [Size] -> ShowS Source #

data FontStyle Source #

The style of a font.

- `StyleOblique` is a slanted font like `StyleItalic`, but in a roman style.

Constructors

StyleNormal |
StyleOblique |
StyleItalic |

#### Instances

Instances details

Enum FontStyle Source # |

Instance details

Defined in Graphics.Rendering.Pango.BasicTypes

Methods

succ :: FontStyle -> FontStyle Source #

pred :: FontStyle -> FontStyle Source #

toEnum :: Int -> FontStyle Source #

fromEnum :: FontStyle -> Int Source #

enumFrom :: FontStyle -> [FontStyle] Source #

enumFromThen :: FontStyle -> FontStyle -> [FontStyle] Source #

enumFromTo :: FontStyle -> FontStyle -> [FontStyle] Source #

enumFromThenTo :: FontStyle -> FontStyle -> FontStyle -> [FontStyle] Source #

Show FontStyle Source # |
Instance details Defined in Graphics.Rendering.Pango.BasicTypes Methods showsPrec :: Int -> FontStyle -> ShowS Source # show :: FontStyle -> String Source # showList :: [FontStyle] -> ShowS Source #
Eq FontStyle Source # |
Instance details Defined in Graphics.Rendering.Pango.BasicTypes Methods (==) :: FontStyle -> FontStyle -> Bool Source # (/=) :: FontStyle -> FontStyle -> Bool Source #

data Weight Source #

Define attributes for `Weight`.

Constructors

WeightThin |
WeightUltralight |
WeightLight |
WeightSemilight |
WeightBook |
WeightNormal |
WeightMedium |
WeightSemibold |
WeightBold |
WeightUltrabold |
WeightHeavy |
WeightUltraheavy |

#### Instances

Instances details

Enum Weight Source # |

Instance details

Defined in Graphics.Rendering.Pango.BasicTypes

Methods

succ :: Weight -> Weight Source #

pred :: Weight -> Weight Source #

toEnum :: Int -> Weight Source #

fromEnum :: Weight -> Int Source #

enumFrom :: Weight -> [Weight] Source #

enumFromThen :: Weight -> Weight -> [Weight] Source #

enumFromTo :: Weight -> Weight -> [Weight] Source #

enumFromThenTo :: Weight -> Weight -> Weight -> [Weight] Source #

Show Weight Source # |
Instance details Defined in Graphics.Rendering.Pango.BasicTypes Methods showsPrec :: Int -> Weight -> ShowS Source # show :: Weight -> String Source # showList :: [Weight] -> ShowS Source #
Eq Weight Source # |
Instance details Defined in Graphics.Rendering.Pango.BasicTypes Methods (==) :: Weight -> Weight -> Bool Source # (/=) :: Weight -> Weight -> Bool Source #

data Variant Source #

The variant of a font.

- The `VariantSmallCaps` is a version of a font where lower case letters are shown as physically smaller upper case letters.

Constructors

VariantNormal |
VariantSmallCaps |
VariantAllSmallCaps |
VariantPetiteCaps |
VariantAllPetiteCaps |
VariantUnicase |
VariantTitleCaps |

#### Instances

Instances details

Enum Variant Source # |

Instance details

Defined in Graphics.Rendering.Pango.BasicTypes

Methods

succ :: Variant -> Variant Source #

pred :: Variant -> Variant Source #

toEnum :: Int -> Variant Source #

fromEnum :: Variant -> Int Source #

enumFrom :: Variant -> [Variant] Source #

enumFromThen :: Variant -> Variant -> [Variant] Source #

enumFromTo :: Variant -> Variant -> [Variant] Source #

enumFromThenTo :: Variant -> Variant -> Variant -> [Variant] Source #

Show Variant Source # |
Instance details Defined in Graphics.Rendering.Pango.BasicTypes Methods showsPrec :: Int -> Variant -> ShowS Source # show :: Variant -> String Source # showList :: [Variant] -> ShowS Source #
Eq Variant Source # |
Instance details Defined in Graphics.Rendering.Pango.BasicTypes Methods (==) :: Variant -> Variant -> Bool Source # (/=) :: Variant -> Variant -> Bool Source #

data Stretch Source #

Define how wide characters are.

Constructors

StretchUltraCondensed |
StretchExtraCondensed |
StretchCondensed |
StretchSemiCondensed |
StretchNormal |
StretchSemiExpanded |
StretchExpanded |
StretchExtraExpanded |
StretchUltraExpanded |

#### Instances

Instances details

Enum Stretch Source # |

Instance details

Defined in Graphics.Rendering.Pango.BasicTypes

Methods

succ :: Stretch -> Stretch Source #

pred :: Stretch -> Stretch Source #

toEnum :: Int -> Stretch Source #

fromEnum :: Stretch -> Int Source #

enumFrom :: Stretch -> [Stretch] Source #

enumFromThen :: Stretch -> Stretch -> [Stretch] Source #

enumFromTo :: Stretch -> Stretch -> [Stretch] Source #

enumFromThenTo :: Stretch -> Stretch -> Stretch -> [Stretch] Source #

Show Stretch Source # |
Instance details Defined in Graphics.Rendering.Pango.BasicTypes Methods showsPrec :: Int -> Stretch -> ShowS Source # show :: Stretch -> String Source # showList :: [Stretch] -> ShowS Source #
Eq Stretch Source # |
Instance details Defined in Graphics.Rendering.Pango.BasicTypes Methods (==) :: Stretch -> Stretch -> Bool Source # (/=) :: Stretch -> Stretch -> Bool Source #

data Underline Source #

Define attributes for `Underline`.

- The squiggly underline for errors is only available in Gtk 2.4 and higher.

Constructors

UnderlineNone |
UnderlineSingle |
UnderlineDouble |
UnderlineLow |
UnderlineError |
UnderlineSingleLine |
UnderlineDoubleLine |
UnderlineErrorLine |

#### Instances

Instances details

Enum Underline Source # |

Instance details

Defined in Graphics.Rendering.Pango.BasicTypes

Methods

succ :: Underline -> Underline Source #

pred :: Underline -> Underline Source #

toEnum :: Int -> Underline Source #

fromEnum :: Underline -> Int Source #

enumFrom :: Underline -> [Underline] Source #

enumFromThen :: Underline -> Underline -> [Underline] Source #

enumFromTo :: Underline -> Underline -> [Underline] Source #

enumFromThenTo :: Underline -> Underline -> Underline -> [Underline] Source #

Show Underline Source # |
Instance details Defined in Graphics.Rendering.Pango.BasicTypes Methods showsPrec :: Int -> Underline -> ShowS Source # show :: Underline -> String Source # showList :: [Underline] -> ShowS Source #
Eq Underline Source # |
Instance details Defined in Graphics.Rendering.Pango.BasicTypes Methods (==) :: Underline -> Underline -> Bool Source # (/=) :: Underline -> Underline -> Bool Source #

data PangoDirection Source #

The `PangoDirection` type represents a direction in the Unicode bidirectional algorithm.

- The "weak" values denote a left-to-right or right-to-left direction only if there is no character with a strong direction in a paragraph. An example is a sequence of special, graphical characters which are neutral with respect to their rendering direction. A fresh `PangoContext` is by default weakly left-to-right.
- Not every value in this enumeration makes sense for every usage of `PangoDirection`; for example, the return value of `unicharDirection` and `findBaseDir` cannot be `PangoDirectionWeakLtr` or `PangoDirectionWeakRtl`, since every character is either neutral or has a strong direction; on the other hand `PangoDirectionNeutral` doesn't make sense to pass to `log2visGetEmbeddingLevels`.

Constructors

PangoDirectionLtr |
PangoDirectionRtl |
PangoDirectionWeakLtr |
PangoDirectionWeakRtl |
PangoDirectionNeutral |

#### Instances

Instances details

Enum PangoDirection Source # |

Instance details

Defined in Graphics.Rendering.Pango.Structs

Methods

succ :: PangoDirection -> PangoDirection Source #

pred :: PangoDirection -> PangoDirection Source #

toEnum :: Int -> PangoDirection Source #

fromEnum :: PangoDirection -> Int Source #

enumFrom :: PangoDirection -> [PangoDirection] Source #

enumFromThen :: PangoDirection -> PangoDirection -> [PangoDirection] Source #

enumFromTo :: PangoDirection -> PangoDirection -> [PangoDirection] Source #

enumFromThenTo :: PangoDirection -> PangoDirection -> PangoDirection -> [PangoDirection] Source #

Eq PangoDirection Source # |
Instance details Defined in Graphics.Rendering.Pango.Structs Methods (==) :: PangoDirection -> PangoDirection -> Bool Source # (/=) :: PangoDirection -> PangoDirection -> Bool Source #
Ord PangoDirection Source # |

Instance details

Defined in Graphics.Rendering.Pango.Structs

Methods

compare :: PangoDirection -> PangoDirection -> Ordering Source #

(<) :: PangoDirection -> PangoDirection -> Bool Source #

(<=) :: PangoDirection -> PangoDirection -> Bool Source #

(>) :: PangoDirection -> PangoDirection -> Bool Source #

(>=) :: PangoDirection -> PangoDirection -> Bool Source #

max :: PangoDirection -> PangoDirection -> PangoDirection Source #

min :: PangoDirection -> PangoDirection -> PangoDirection Source #

data PangoAttribute Source #

Attributes for `PangoItem`s.

- A given attribute is applied from its start position `paStart` up, but not including the end position, `paEnd`.

Constructors

AttrLanguage | A hint as to what language this piece of text is written in.

Fields

- paStart :: Int
- paEnd :: Int
- paLang :: Language

AttrFamily | The font family, e.g. `sans serif`.

Fields

- paStart :: Int
- paEnd :: Int
- paFamily :: DefaultGlibString

AttrStyle | The slant of the current font.

Fields

- paStart :: Int
- paEnd :: Int
- paStyle :: FontStyle

AttrWeight | Weight of font, e.g. `WeightBold`.

Fields

- paStart :: Int
- paEnd :: Int
- paWeight :: Weight

AttrVariant | `VariantSmallCaps` will display lower case letters as small upper case letters (if the font supports this).

Fields

- paStart :: Int
- paEnd :: Int
- paVariant :: Variant

AttrStretch | Stretch or condense the width of the letters.

Fields

- paStart :: Int
- paEnd :: Int
- paStretch :: Stretch

AttrSize | Specify the size of the font in points.

Fields

- paStart :: Int
- paEnd :: Int
- paSize :: Double

AttrAbsSize

Specify the size of the font in device units (pixels).

- Available in Pango 1.8.0 and higher.

Fields

- paStart :: Int
- paEnd :: Int
- paSize :: Double

AttrFontDescription | Specify several attributes of a font at once. Note that no deep copy of the description is made when this attributes is passed to or received from functions.

Fields

- paStart :: Int
- paEnd :: Int
- paFontDescription :: FontDescription

AttrForeground | Specify the foreground color.

Fields

- paStart :: Int
- paEnd :: Int
- paColor :: Color

AttrBackground | Specify the background color.

Fields

- paStart :: Int
- paEnd :: Int
- paColor :: Color

AttrUnderline | Specify the kind of underline, e.g. `UnderlineSingle`.

Fields

- paStart :: Int
- paEnd :: Int
- paUnderline :: Underline

AttrUnderlineColor

Specify the color of an underline.

- Available in Pango 1.8.0 and higher.

Fields

- paStart :: Int
- paEnd :: Int
- paColor :: Color

AttrStrikethrough | Specify if this piece of text should have a line through it.

Fields

- paStart :: Int
- paEnd :: Int
- paStrikethrough :: Bool

AttrStrikethroughColor

Specify the color of the strike through line.

- Available in Pango 1.8.0 and higher.

Fields

- paStart :: Int
- paEnd :: Int
- paColor :: Color

AttrRise | Displace the text vertically. Positive values move the text upwards.

Fields

- paStart :: Int
- paEnd :: Int
- paRise :: Double

AttrShape

Restrict the amount of what is drawn of the marked shapes.

- Available in Pango 1.8.0 and higher.

Fields

- paStart :: Int
- paEnd :: Int
- paInk :: PangoRectangle
- paLogical :: PangoRectangle

AttrScale | Scale the font up (values greater than one) or shrink the font.

Fields

- paStart :: Int
- paEnd :: Int
- paScale :: Double

AttrFallback | Determine if a fall back font should be substituted if no matching font is available.

Fields

- paStart :: Int
- paEnd :: Int
- paFallback :: Bool

AttrLetterSpacing

Add extra space between graphemes of the text.

- Available in Pango 1.6.0 and higher.

Fields

- paStart :: Int
- paEnd :: Int
- paLetterSpacing :: Double

AttrGravity

Sets the gravity field of a font description. The gravity field specifies how the glyphs should be rotated. If gravity is `GravityAuto`, this actually unsets the gravity mask on the font description.

- This function is seldom useful to the user. Gravity should normally be set on a `PangoContext`.
- Available in Pango 1.16.0 and higher.

Fields

- paStart :: Int
- paEnd :: Int
- paGravity :: PangoGravity

AttrGravityHint

Set the way horizontal scripts behave in a vertical context.

- Available in Pango 1.16.0 and higher.

Fields

- paStart :: Int
- paEnd :: Int
- paGravityHint :: PangoGravityHint

#### Instances

Instances details

Show PangoAttribute Source # |
Instance details Defined in Graphics.Rendering.Pango.Structs Methods showsPrec :: Int -> PangoAttribute -> ShowS Source # show :: PangoAttribute -> String Source # showList :: [PangoAttribute] -> ShowS Source #

data EllipsizeMode Source #

The `EllipsizeMode` type describes what sort of (if any) ellipsization should be applied to a line of text. In the ellipsization process characters are removed from the text in order to make it fit to a given width and replaced with an ellipsis.

Constructors

EllipsizeNone |
EllipsizeStart |
EllipsizeMiddle |
EllipsizeEnd |

#### Instances

Instances details

Enum EllipsizeMode Source # |

Instance details

Defined in Graphics.Rendering.Pango.Enums

Methods

succ :: EllipsizeMode -> EllipsizeMode Source #

pred :: EllipsizeMode -> EllipsizeMode Source #

toEnum :: Int -> EllipsizeMode Source #

fromEnum :: EllipsizeMode -> Int Source #

enumFrom :: EllipsizeMode -> [EllipsizeMode] Source #

enumFromThen :: EllipsizeMode -> EllipsizeMode -> [EllipsizeMode] Source #

enumFromTo :: EllipsizeMode -> EllipsizeMode -> [EllipsizeMode] Source #

enumFromThenTo :: EllipsizeMode -> EllipsizeMode -> EllipsizeMode -> [EllipsizeMode] Source #

Eq EllipsizeMode Source # |
Instance details Defined in Graphics.Rendering.Pango.Enums Methods (==) :: EllipsizeMode -> EllipsizeMode -> Bool Source # (/=) :: EllipsizeMode -> EllipsizeMode -> Bool Source #

data PangoGravity Source #

The `PangoGravity` type represents the orientation of glyphs in a segment of text. The value `GravitySouth`, for instance, indicates that the text stands upright, i.e. that the base of the letter is directed downwards.

This is useful when rendering vertical text layouts. In those situations, the layout is rotated using a non-identity `PangoMatrix`, and then glyph orientation is controlled using `PangoGravity`. Not every value in this enumeration makes sense for every usage of `Gravity`; for example, `PangoGravityAuto` only can be passed to `pangoContextSetBaseGravity` and can only be returned by `pangoContextGetBaseGravity`.

- See also: `PangoGravityHint`
- Gravity is resolved from the context matrix.
- Since Pango 1.16

Constructors

PangoGravitySouth |
PangoGravityEast |
PangoGravityNorth |
PangoGravityWest |
PangoGravityAuto |

#### Instances

Instances details

Enum PangoGravity Source # |

Instance details

Defined in Graphics.Rendering.Pango.BasicTypes

Methods

succ :: PangoGravity -> PangoGravity Source #

pred :: PangoGravity -> PangoGravity Source #

toEnum :: Int -> PangoGravity Source #

fromEnum :: PangoGravity -> Int Source #

enumFrom :: PangoGravity -> [PangoGravity] Source #

enumFromThen :: PangoGravity -> PangoGravity -> [PangoGravity] Source #

enumFromTo :: PangoGravity -> PangoGravity -> [PangoGravity] Source #

enumFromThenTo :: PangoGravity -> PangoGravity -> PangoGravity -> [PangoGravity] Source #

Show PangoGravity Source # |
Instance details Defined in Graphics.Rendering.Pango.BasicTypes Methods showsPrec :: Int -> PangoGravity -> ShowS Source # show :: PangoGravity -> String Source # showList :: [PangoGravity] -> ShowS Source #
Eq PangoGravity Source # |
Instance details Defined in Graphics.Rendering.Pango.BasicTypes Methods (==) :: PangoGravity -> PangoGravity -> Bool Source # (/=) :: PangoGravity -> PangoGravity -> Bool Source #

data PangoGravityHint Source #

The `PangoGravityHint` defines how horizontal scripts should behave in a vertical context.

- `PangoGravityHintNatural`: scripts will take their natural gravity based on the base gravity and the script. This is the default.
- `PangoGravityHintStrong`: always use the base gravity set, regardless of the script.
- `PangoGravityHintLine`: for scripts not in their natural direction (eg. Latin in East gravity), choose per-script gravity such that every script respects the line progression. This means, Latin and Arabic will take opposite gravities and both flow top-to-bottom for example.

Constructors

PangoGravityHintNatural |
PangoGravityHintStrong |
PangoGravityHintLine |

#### Instances

Instances details

Enum PangoGravityHint Source # |

Instance details

Defined in Graphics.Rendering.Pango.BasicTypes

Methods

succ :: PangoGravityHint -> PangoGravityHint Source #

pred :: PangoGravityHint -> PangoGravityHint Source #

toEnum :: Int -> PangoGravityHint Source #

fromEnum :: PangoGravityHint -> Int Source #

enumFrom :: PangoGravityHint -> [PangoGravityHint] Source #

enumFromThen :: PangoGravityHint -> PangoGravityHint -> [PangoGravityHint] Source #

enumFromTo :: PangoGravityHint -> PangoGravityHint -> [PangoGravityHint] Source #

enumFromThenTo :: PangoGravityHint -> PangoGravityHint -> PangoGravityHint -> [PangoGravityHint] Source #

Show PangoGravityHint Source # |
Instance details Defined in Graphics.Rendering.Pango.BasicTypes Methods showsPrec :: Int -> PangoGravityHint -> ShowS Source # show :: PangoGravityHint -> String Source # showList :: [PangoGravityHint] -> ShowS Source #
Eq PangoGravityHint Source # |
Instance details Defined in Graphics.Rendering.Pango.BasicTypes Methods (==) :: PangoGravityHint -> PangoGravityHint -> Bool Source # (/=) :: PangoGravityHint -> PangoGravityHint -> Bool Source #

data Language Source #

An RFC-3066 language designator to choose scripts.

#### Instances

Instances details

Show Language Source # |
Instance details Defined in Graphics.Rendering.Pango.BasicTypes Methods showsPrec :: Int -> Language -> ShowS Source # show :: Language -> String Source # showList :: [Language] -> ShowS Source #
Eq Language Source # |
Instance details Defined in Graphics.Rendering.Pango.BasicTypes Methods (==) :: Language -> Language -> Bool Source # (/=) :: Language -> Language -> Bool Source #

emptyLanguage :: Language Source #

Specifying no particular language.

languageFromString :: GlibString string => string -> IO Language Source #

Take a RFC-3066 format language tag as a string and convert it to a `Language` type that can be efficiently passed around and compared with other language tags.

- This function first canonicalizes the string by converting it to lowercase, mapping '_' to '-', and stripping all characters other than letters and '-'.