FreeTypeAbstraction.jl
FreeTypeAbstraction.jl copied to clipboard
Linux compatibility
The following code works properly on Windows, but outputs a zero array on Linux:
using FreeTypeAbstraction, Images, FileIO
sz = (128,128)
str = "c"
pixelsize = sz[2] ÷ length(str)
face = findfont("arial bold")
x0, y0 = sz .÷ 2
arr = zeros(UInt8,sz...)
renderstring!(arr,str,face,pixelsize, x0, y0; halign=:hcenter, valign=:vcenter)
Gray.(convert.(Float64,arr)./255)
Windows output:
Linux output: