From 2eb97269bd052d6c1a29ddce695074d0362b2df4 Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Fri, 31 Mar 2023 16:16:14 +1300 Subject: [PATCH] Expose exception & update metadata. --- Data/Text/Glyphize.hs | 7 ++++--- Data/Text/Glyphize/Oom.hs | 2 ++ harfbuzz-pure.cabal | 15 ++++++++++----- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Data/Text/Glyphize.hs b/Data/Text/Glyphize.hs index ec84b09..54ffdf8 100644 --- a/Data/Text/Glyphize.hs +++ b/Data/Text/Glyphize.hs @@ -1,10 +1,10 @@ {-# LANGUAGE OverloadedStrings #-} -- | HarfBuzz is a text shaping library. -- Using the HarfBuzz library allows programs to convert a sequence of --- Unicode input into properly formatted and positioned glyph output — --- for any writing system and language. +-- Unicode input into properly formatted and positioned glyph output +-- for practically any writing system and language. -- See `shape` for the central function all other datatypes serves to support. -module Data.Text.Glyphize (shape, version, versionAtLeast, versionString, +module Data.Text.Glyphize (shape, version, versionAtLeast, versionString, HarfbuzzError(..), Buffer(..), ContentType(..), ClusterLevel(..), Direction(..), defaultBuffer, dirFromStr, dirToStr, dirReverse, dirBackward, dirForward, dirHorizontal, dirVertical, @@ -31,6 +31,7 @@ module Data.Text.Glyphize (shape, version, versionAtLeast, versionString, import Data.Text.Glyphize.Font import Data.Text.Glyphize.Buffer +import Data.Text.Glyphize.Oom import System.IO.Unsafe (unsafePerformIO) import Foreign.Ptr (Ptr(..)) diff --git a/Data/Text/Glyphize/Oom.hs b/Data/Text/Glyphize/Oom.hs index 047a7ec..7a2105b 100644 --- a/Data/Text/Glyphize/Oom.hs +++ b/Data/Text/Glyphize/Oom.hs @@ -3,6 +3,8 @@ module Data.Text.Glyphize.Oom where import Control.Exception import Foreign.Ptr (nullPtr, Ptr) +-- | Indicates that Harfbuzz has ran out of memory during a computation. +-- Should be extremely rare! data HarfbuzzError = OutOfMemory deriving (Show) instance Exception HarfbuzzError diff --git a/harfbuzz-pure.cabal b/harfbuzz-pure.cabal index 3e41e7a..e14229e 100644 --- a/harfbuzz-pure.cabal +++ b/harfbuzz-pure.cabal @@ -10,13 +10,13 @@ name: harfbuzz-pure -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change -version: 1.0.2.0 +version: 1.0.3.1 -- A short (one-line) description of the package. synopsis: Pure-functional Harfbuzz language bindings -- A longer description of the package. -description: HarfBuzz is a text shaping library. Using the HarfBuzz library allows programs to convert a sequence of Unicode input into properly formatted and positioned glyph output—for any writing system and language. +description: HarfBuzz is a text shaping library. Using the HarfBuzz library allows programs to convert a sequence of Unicode input into properly formatted and positioned glyph output; for practically any writing system and written language. NOTE: You may need to install Harfbuzz 3.3.0 (Jan 2022) or newer from source, it hasn't been widely packaged yet. -- URL for the project homepage or repository. @@ -33,10 +33,12 @@ author: Adrian Cochrane -- An email address to which users can send suggestions, bug reports, and -- patches. -maintainer: opensource@openwork.nz +maintainer: ~alcinnz/harfbuzz-pure@todo.argonaut-constellation.org + +bug-reports: https://todo.argonaut-constellation.org/~alcinnz/harfbuzz-pure -- A copyright notice. --- copyright: +copyright: Language bindings © 2022, 2023 Adrian Cochrane category: Text @@ -49,6 +51,9 @@ extra-source-files: ChangeLog.md -- Constraint on the version of Cabal needed to build this package. cabal-version: >=1.10 +source-repository head + type: git + location: https://git.argonaut-constellation.org/~alcinnz/harfbuzz-pure library -- Modules exported by the library. @@ -61,7 +66,7 @@ library -- other-extensions: -- Other library packages from which modules are imported. - build-depends: base >=4.12 && <4.13, text >= 2.0 && < 3, + build-depends: base >=4.12 && <4.16, text >= 2.0 && < 3, bytestring >= 0.11, freetype2 >= 0.2, derive-storable >= 0.3 && < 1 pkgconfig-depends: harfbuzz >= 3.3 -- 2.30.2