summaryrefslogtreecommitdiff
path: root/src/Graphics/Fountainhead/Parser.hs
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2023-12-27 16:19:21 +0100
committerEugen Wissner <belka@caraus.de>2023-12-27 16:19:21 +0100
commit16d9fc384fa6180c8b7e875bd95065adce346c30 (patch)
tree5096daddd5aff7d21dbed6085484297b1b8a6583 /src/Graphics/Fountainhead/Parser.hs
parenta841f138fc9055f4bc32db292a675f93f081b4e7 (diff)
downloadfountainhead-16d9fc384fa6180c8b7e875bd95065adce346c30.tar.gz
Decompress defalte compressed fonts
Diffstat (limited to 'src/Graphics/Fountainhead/Parser.hs')
-rw-r--r--src/Graphics/Fountainhead/Parser.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Graphics/Fountainhead/Parser.hs b/src/Graphics/Fountainhead/Parser.hs
index 590f95f..bb74ea7 100644
--- a/src/Graphics/Fountainhead/Parser.hs
+++ b/src/Graphics/Fountainhead/Parser.hs
@@ -12,6 +12,7 @@
-- | Font parser.
module Graphics.Fountainhead.Parser
( Parser
+ , ParseErrorBundle
, cmapTableP
, cvTableP
, f2Dot14P
@@ -147,6 +148,7 @@ import qualified Text.Megaparsec as Megaparsec
import qualified Text.Megaparsec.Byte.Binary as Megaparsec.Binary
type Parser = Megaparsec.Parsec Void ByteString
+type ParseErrorBundle = Megaparsec.ParseErrorBundle ByteString Void
-- * Font directory
@@ -942,7 +944,7 @@ parseTable
:: TableDirectory
-> Parser a
-> Megaparsec.State ByteString Void
- -> Either (Megaparsec.ParseErrorBundle ByteString Void) a
+ -> Either ParseErrorBundle a
parseTable TableDirectory{ offset, length = length' } parser state = snd
$ Megaparsec.runParser' parser
$ state