module Data.Text.ParagraphLayout.FontLoader (loadUbuntuRegular) where
import Data.ByteString (readFile)
import Data.Text.Glyphize
(Font
,createFace
,createFont
)
import Prelude (IO, return)
import System.FilePath ((</>))
loadUbuntuRegular :: IO Font
loadUbuntuRegular = do
ttf <- readFile ("assets" </> "fonts" </> "ubuntu" </> "Ubuntu-R.ttf")
let face = createFace ttf 0
let font = createFont face
return font