~alcinnz/fontconfig-pure

Pure-functional language bindings to FontConfig; determines which fontfile to use for a fontfamily, style, & size.
dfb515ef — Adrian Cochrane 6 months ago
Segfault fixes.
3ca6576c — Adrian Cochrane 6 months ago
Improve lazy performance, release 0.3.0.1
a454eb87 — Adrian Cochrane 6 months ago
Performance optimizations, partially-tested as 0.3.0.0

refs

main
browse  log 

clone

read-only
https://git.argonaut-constellation.org/~alcinnz/fontconfig-pure
read/write
git@git.argonaut-constellation.org:~alcinnz/fontconfig-pure

You can also use your local clone with git send-email.

#FontConfig Pure

Source Code | Issues | Hackage

Pure-functional language bindings to FontConfig. Mostly consists of conversions between common Haskell types & FontConfig's imperative C types.

Queries a database of fonts, both in-memory & on the local filesystem, to find the one most closely matching your desired font-family, style, & size. Includes bridges from Haskell Stylist and to both FreeType & (soon) Harfbuzz.

#Requirements

  • FontConfig 2.13 or greater
  • LibStdC++ (for Text dependency)
  • Cabal

Cabal can install the rest.

#Use

Please see the Haddock documentation for API usage.

Contains a demo program in Main.hs, which can be run via cabal run, to query the system font database using standard FontConfig query syntax given in commandline arguments.

There's a tentative expansion with its own testscript which bridges over to Harfbuzz-Pure, & includes a testscript which renders "sphinx of black quartz judge my vow" using the best matching fontfile for your query. This is being held up until a new version of Haskell CSS Syntax is released to Hackage supporting UTF-8 Text.

#Contributing

Please send patches to our issue tracker by either:

Whichever you find most convenient.

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