balkon-0.2.0.0: Text layout engine built on top of HarfBuzz.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Text.ParagraphLayout

Description

Positions and distances are represented as 32-bit integers. Their unit must be defined by the caller, who must calculate the desired dimensions of the EM square of the input font and set them using optionScale.

For example, if 1em = 20px, if the output pixels are square, and if the output coordinates are in 1/64ths of a pixel, you should set the scale to Just (1280, 1280).

X coordinates increase from left to right.

Y coordinates increase from bottom to top.

Documentation

data Fragment #

Constructors

Fragment 

Fields

Instances

Instances details
Read Fragment 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Fragment

Methods

readsPrec :: Int -> ReadS Fragment

readList :: ReadS [Fragment]

readPrec :: ReadPrec Fragment

readListPrec :: ReadPrec [Fragment]

Show Fragment 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Fragment

Methods

showsPrec :: Int -> Fragment -> ShowS

show :: Fragment -> String

showList :: [Fragment] -> ShowS

Eq Fragment 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Fragment

Methods

(==) :: Fragment -> Fragment -> Bool

(/=) :: Fragment -> Fragment -> Bool

data LineHeight #

Constructors

Normal 
Absolute Int32 

Instances

Instances details
Read LineHeight 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.LineHeight

Methods

readsPrec :: Int -> ReadS LineHeight

readList :: ReadS [LineHeight]

readPrec :: ReadPrec LineHeight

readListPrec :: ReadPrec [LineHeight]

Show LineHeight 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.LineHeight

Methods

showsPrec :: Int -> LineHeight -> ShowS

show :: LineHeight -> String

showList :: [LineHeight] -> ShowS

Eq LineHeight 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.LineHeight

Methods

(==) :: LineHeight -> LineHeight -> Bool

(/=) :: LineHeight -> LineHeight -> Bool

data Paragraph #

Constructors

Paragraph Array Int [Span] ParagraphOptions 

data ParagraphLayout #

Constructors

ParagraphLayout 

Fields

Instances

Instances details
Read ParagraphLayout 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.ParagraphLayout

Show ParagraphLayout 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.ParagraphLayout

Methods

showsPrec :: Int -> ParagraphLayout -> ShowS

show :: ParagraphLayout -> String

showList :: [ParagraphLayout] -> ShowS

Eq ParagraphLayout 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.ParagraphLayout

data ParagraphOptions #

Instances

Instances details
Show ParagraphOptions 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Paragraph

Methods

showsPrec :: Int -> ParagraphOptions -> ShowS

show :: ParagraphOptions -> String

showList :: [ParagraphOptions] -> ShowS

Eq ParagraphOptions 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Paragraph

data Span #

Constructors

Span 

Instances

Instances details
Read Span 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Span

Methods

readsPrec :: Int -> ReadS Span

readList :: ReadS [Span]

readPrec :: ReadPrec Span

readListPrec :: ReadPrec [Span]

Show Span 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Span

Methods

showsPrec :: Int -> Span -> ShowS

show :: Span -> String

showList :: [Span] -> ShowS

Eq Span 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Span

Methods

(==) :: Span -> Span -> Bool

(/=) :: Span -> Span -> Bool

data SpanLayout #

Constructors

SpanLayout [Fragment] 

Instances

Instances details
Read SpanLayout 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Span

Methods

readsPrec :: Int -> ReadS SpanLayout

readList :: ReadS [SpanLayout]

readPrec :: ReadPrec SpanLayout

readListPrec :: ReadPrec [SpanLayout]

Show SpanLayout 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Span

Methods

showsPrec :: Int -> SpanLayout -> ShowS

show :: SpanLayout -> String

showList :: [SpanLayout] -> ShowS

Eq SpanLayout 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Span

Methods

(==) :: SpanLayout -> SpanLayout -> Bool

(/=) :: SpanLayout -> SpanLayout -> Bool

data SpanOptions #

Constructors

SpanOptions 

Fields

Instances

Instances details
Read SpanOptions 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Span

Methods

readsPrec :: Int -> ReadS SpanOptions

readList :: ReadS [SpanOptions]

readPrec :: ReadPrec SpanOptions

readListPrec :: ReadPrec [SpanOptions]

Show SpanOptions 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Span

Methods

showsPrec :: Int -> SpanOptions -> ShowS

show :: SpanOptions -> String

showList :: [SpanOptions] -> ShowS

Eq SpanOptions 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Span

Methods

(==) :: SpanOptions -> SpanOptions -> Bool

(/=) :: SpanOptions -> SpanOptions -> Bool