~alcinnz/harfbuzz-pure

be942b126a16bda5c1ebdae18ed22c512e12d053 — Adrian Cochrane 1 year, 8 months ago 2eb9726 + 68d376a
Merge branch 'main' of git.argonaut-constellation.org:~alcinnz/harfbuzz-pure
3 files changed, 16 insertions(+), 5 deletions(-)

M Data/Text/Glyphize/Font.hs
M README.md
M harfbuzz-pure.cabal
M Data/Text/Glyphize/Font.hs => Data/Text/Glyphize/Font.hs +4 -4
@@ 660,11 660,11 @@ fontScale :: Font -> (Int, Int)
fontScale font = unsafePerformIO $
    withForeignPtr font $ \font' -> alloca $ \x' -> alloca $ \y' -> do
        hb_font_get_scale font' x' y'
        x <- peek x'
        y <- peek y'
        return (x, y)
        x <- peek x' :: IO Int32
        y <- peek y' :: IO Int32
        return (fromEnum x, fromEnum y)
foreign import ccall "hb_font_get_scale" hb_font_get_scale
    :: Font_ -> Ptr Int -> Ptr Int -> IO ()
    :: Font_ -> Ptr Int32 -> Ptr Int32 -> IO ()

-- | Fetches the "synthetic slant" of a font.
fontSyntheticSlant :: Font -> Float

M README.md => README.md +11 -0
@@ 21,3 21,14 @@ For normal use please install via Hackage.
Please see the Haddock documentation for API usage.

Contains a demo program in `Main.hs`, which can be run via `cabal run`, that textually outputs the shaping data for given text under the [Lora](https://fonts.adobe.com/fonts/lora) font. Commandline arguments, if any, are the text to be rendered. Otherwise uses "Testing, testing".

## Contributing
Please send patches to our [issue tracker](https://todo.argonaut-constellation.org/~alcinnz/harfbuzz-pure) by either:

* Attaching the output of `git format-patch`.
* [git send-email](https://git-send-email.io/) to ~alcinnz/harfbuzz-pure@todo.argonaut-constellation.org .
* Linking to your fork elsewhere.

Whichever you find most convenient.

If you'd prefer to not make your email address public please contact alcinnz@argonaut-constellation.org !

M harfbuzz-pure.cabal => harfbuzz-pure.cabal +1 -1
@@ 66,7 66,7 @@ library
  -- other-extensions:    
  
  -- Other library packages from which modules are imported.
  build-depends:       base >=4.12 && <4.16, text >= 2.0 && < 3,
  build-depends:       base >=4.12 && <5, text >= 2.0 && < 3,
                       bytestring >= 0.11, freetype2 >= 0.2, derive-storable >= 0.3 && < 1
  pkgconfig-depends:   harfbuzz >= 3.3