AtlatestRenderedmarkdown
Readme

sigil-freetype

FreeType font loading FFI bindings for Sigil.

Features

  • FreeType library initialization and cleanup
  • Font face loading from file paths
  • Character size and pixel size configuration
  • Glyph loading and metrics access
  • Character index lookup

Usage

(import (sigil ffi)
        (freetype))

(let* ((lib (ft-init-freetype))
       (face (ft-new-face lib "/path/to/font.ttf" 0)))
  (ft-set-pixel-sizes face 0 24)
  (ft-load-char face 65 FT_LOAD_RENDER)
  ;; Access glyph metrics...
  (ft-done-face face)
  (ft-done-freetype lib))

Dependencies

  • sigil-stdlib
  • sigil-ffi

Requires FreeType system library (libfreetype).

System Prerequisites

Development

sigil deps install
sigil build
sigil test

License

BSD-3-Clause