iuliancioarca / FreeTypeAbstraction.jl

A Julian abstraction layer over FreeType.jl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FreeTypeAbstraction

Draw text into a Matrix.

using FreeTypeAbstraction

# load a font
face = FTFont("hack_regular.ttf")

# render a character
img, metric = renderface(face, 'C')

# render a string into an existing matrix
myarray = zeros(UInt8,100,100)
renderstring!(myarray, "hello", face, (10,10), 90, 10, halign=:hright)

credits to @aaalexandrov from whom most of the code stems.

About

A Julian abstraction layer over FreeType.jl

License:Other


Languages

Language:Julia 100.0%