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

LibGD v2.3.0 has a bug that is breaking font.rb #22

Open
krunde-nextpoint opened this issue Nov 30, 2020 · 0 comments
Open

LibGD v2.3.0 has a bug that is breaking font.rb #22

krunde-nextpoint opened this issue Nov 30, 2020 · 0 comments

Comments

@krunde-nextpoint
Copy link

In LibGD v2.3.0 they added a "feature" so you cannot draw a blank string. This is often used to check if a font exists. gd2-ffij uses it in font.rb line 215:
r = ::GD2::GD2FFI.send(:gdImageStringFTEx, *args)

This is an issue in LibGD and they have a fix, but have released a new version yet: libgd/libgd#615

Since Homebrew is on version 2.3.0 this has been causing us an issue testing locally. We did a monkey patch that replaces the error on line 219 from
raise FreeTypeError.new(r.read_string) unless r.null?
to
raise FreeTypeError.new(r.read_string) unless r.null? || r.read_string == 'Problem doing text layout'
In order to get around this for now until a new version of LibGD comes out. You probably don't want to add that to your main code so I am not submitting a PR for this. Just wanted to make it easy for others to find if they hit the same issue.

This shows up as the following error message:
Problem doing text layout

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