Skip to content
clx-truetype minus the clx, just outputs 2d arrays of alpha values from 0-255
Common Lisp
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
truetype-clx.asd
truetype-clx.lisp

README.md

truetype-clx

clx-truetype minus the clx, just outputs 2d arrays of alpha values with metrics.

TEXT-PIXARRAY works for single character strings, outputting just the glyph with no padding.

TEXT-LINE-PIXARRAY works for text strings and adds line height padding.

Font is a string designating the path to a ttf font.

Adjust inch/pts to your needs, currently set at 72.

e.g. This is the output difference between text-line-pixarray and text-pixarray as output by the following command. (visualize:this (truetype-clx:text-line-pixarray (font-match:find-match "deja") "J" 28 144 144) :surface surface :zoom 5 :gridp t :spacing 5 :second-spacing 10 :palette (palette:create-alpha-palette 256))

https://imgur.com/a/mYPkGp4

https://imgur.com/a/NBDlaVW

You can’t perform that action at this time.