Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux compatibility #89

Open
orswan opened this issue Aug 23, 2024 · 0 comments
Open

Linux compatibility #89

orswan opened this issue Aug 23, 2024 · 0 comments

Comments

@orswan
Copy link

orswan commented Aug 23, 2024

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:

windows_output

Linux output:

linux_out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant