~alcinnz/harfbuzz-pure

8cd531a20425c79fefcc71395198ac869babf536 — Adrian Cochrane 1 year, 3 months ago 39fea31 + 9f9a5ae
Merge branch 'master' of git.adrian.geek.nz:/srv/git/harfbuzz-pure
3 files changed, 10 insertions(+), 6 deletions(-)

M Data/Text/Glyphize/Buffer.hs
M Data/Text/Glyphize/Font.hs
M harfbuzz-pure.cabal
M Data/Text/Glyphize/Buffer.hs => Data/Text/Glyphize/Buffer.hs +5 -1
@@ 10,7 10,6 @@ import Control.Exception (bracket)

--- To fill computed text property.
import Data.Text.Encoding (decodeUtf8Lenient)
import Codec.Binary.UTF8.Light (encodeUTF8, w2c, c2w)

import qualified Data.Text.Array as A
import GHC.Exts (ByteArray#, sizeofByteArray#, Int#)


@@ 283,6 282,11 @@ tag_to_string tag = [
    w2c (shiftR tag 0 .&. 0x7f)
  ]

c2w :: Char -> Word32
c2w = toEnum . fromEnum
w2c :: Word32 -> Char
w2c = toEnum . fromEnum

------
--- Haskell-to-C conversion
------

M Data/Text/Glyphize/Font.hs => Data/Text/Glyphize/Font.hs +3 -3
@@ 5,11 5,11 @@ import Data.ByteString.Internal (ByteString(..))
import Data.ByteString (packCStringLen)
import Data.Word (Word8, Word32)
import Data.Int (Int32)
import FreeType.Core.Base (FT_Face, frSize)
import Data.Text.Glyphize.Buffer (tag_to_string, tag_from_string, Direction, dir2int)
import FreeType.Core.Base (FT_Face)
import Data.Text.Glyphize.Buffer (tag_to_string, tag_from_string, Direction, dir2int,
                                c2w, w2c)

import Control.Monad (forM, unless)
import Codec.Binary.UTF8.Light (w2c, c2w)
import Data.Maybe (fromMaybe)

import System.IO.Unsafe (unsafePerformIO)

M harfbuzz-pure.cabal => harfbuzz-pure.cabal +2 -2
@@ 10,7 10,7 @@ name:                harfbuzz-pure
-- PVP summary:      +-+------- breaking API changes
--                   | | +----- non-breaking API additions
--                   | | | +--- code changes with no API change
version:             1.0.0.0
version:             1.0.0.1

-- A short (one-line) description of the package.
synopsis:            Pure-functional Harfbuzz language bindings


@@ 60,7 60,7 @@ library
  -- other-extensions:    
  
  -- Other library packages from which modules are imported.
  build-depends:       base >=4.12 && <4.13, text >= 2.0 && < 3, utf8-light >= 0.4 && < 0.5,
  build-depends:       base >=4.12 && <4.13, text >= 2.0 && < 3,
                       bytestring >= 0.11, freetype2 >= 0.2, derive-storable >= 0.3 && < 1
  pkgconfig-depends:   harfbuzz