balkon-0.3.0.0: Text layout engine built on top of HarfBuzz.
Safe HaskellNone
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
Eq Fragment 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Fragment

Methods

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

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

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

data LineHeight #

Constructors

Normal 
Absolute Int32 

Instances

Instances details
Eq LineHeight 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.LineHeight

Methods

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

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

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

data PageOptions #

Constructors

PageOptions 

Fields

class Paginable pl #

Minimal complete definition

paginate

Instances

Instances details
Paginable ParagraphLayout 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Paginable

Line a => Paginable [a] 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Paginable

Methods

paginate :: PageOptions -> [a] -> (PageContinuity, [a], Maybe [a]) #

data Span #

Constructors

Span 

Instances

Instances details
Eq Span 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Span

Methods

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

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

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

data SpanLayout #

Constructors

SpanLayout [Fragment] 

Instances

Instances details
Eq SpanLayout 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Span

Methods

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

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

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

data SpanOptions #

Constructors

SpanOptions 

Fields

Instances

Instances details
Eq SpanOptions 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Span

Methods

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

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

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

paginate :: Paginable pl => PageOptions -> pl -> (PageContinuity, pl, Maybe pl) #

paragraphSpanBounds :: Paragraph -> NonEmpty Int #