diff options
| author | Eugen Wissner <belka@caraus.de> | 2023-11-17 09:54:26 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2023-11-17 09:54:26 +0100 |
| commit | 344467b8508b86838ba652f719a017f3415c9a96 (patch) | |
| tree | e2a0e3b33ceec8560715b702e60b28a386be85e3 /src/Graphics/Fountainhead/Parser.hs | |
| parent | ac03d3236deececd13660295d8528e2d0de639ed (diff) | |
| download | fountainhead-344467b8508b86838ba652f719a017f3415c9a96.tar.gz | |
Dump the hhea table
Diffstat (limited to 'src/Graphics/Fountainhead/Parser.hs')
| -rw-r--r-- | src/Graphics/Fountainhead/Parser.hs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Graphics/Fountainhead/Parser.hs b/src/Graphics/Fountainhead/Parser.hs index 02d7a29..f39cbda 100644 --- a/src/Graphics/Fountainhead/Parser.hs +++ b/src/Graphics/Fountainhead/Parser.hs @@ -38,7 +38,7 @@ module Graphics.Fountainhead.Parser ) where import Control.Applicative (Alternative(..)) -import Control.Monad (foldM) +import Control.Monad (foldM, void) import Data.Bits (Bits(..)) import Data.ByteString (ByteString) import qualified Data.ByteString as ByteString @@ -260,9 +260,9 @@ hheaTableP = HheaTable <*> Megaparsec.Binary.int16be <*> Megaparsec.Binary.int16be <*> Megaparsec.Binary.word16be - <*> Megaparsec.Binary.word16be - <*> Megaparsec.Binary.word16be - <*> Megaparsec.Binary.word16be + <*> Megaparsec.Binary.int16be + <*> Megaparsec.Binary.int16be + <*> Megaparsec.Binary.int16be <*> Megaparsec.Binary.int16be <*> Megaparsec.Binary.int16be <*> Megaparsec.Binary.int16be @@ -423,12 +423,13 @@ deviceRecordP size = do hdmxTableP :: Parser HdmxTable hdmxTableP = do - Megaparsec.chunk $ ByteString.pack [0, 0] + void $ Megaparsec.chunk $ ByteString.pack [0, 0] numberOfDeviceRecords <- fromIntegral <$> Megaparsec.Binary.int16be sizeOfDeviceRecord <- fromIntegral <$> Megaparsec.Binary.int32be records' <- Megaparsec.count numberOfDeviceRecords $ deviceRecordP sizeOfDeviceRecord - Megaparsec.eof >> pure (HdmxTable 0 records') + Megaparsec.eof + pure $ HdmxTable 0 records' -- * Glyph outline table |
