-
Notifications
You must be signed in to change notification settings - Fork 368
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
Generated PDF/PNG are Broken But DOT Format Works #355
Comments
@pacarvalho I was experiencing the same issue. The core of the problem is that the font specified by the RailsERD gem is "Arial" and this font is not available within the ruby Alpine image being used in your Dockerfile. Additionally, you cannot override this font through the standard RailsERD config options. There is a way to install Arial into the Ruby Alpine Docker image. However, I have not been able to get this to work using the I solved this by monkey patching the RailsERD gem via an initializer. I override the method returning the Arial font names. I opted to installed the NOTO font package (I believe any font would work). Dockerfile
./config/initalizers/rails_erd.rb
I am running 6.1.3 and was able to successfully generate a PDF diagram using this method. @voormedia It would be great if we could pass in font names when generating diagrams or as a YAML configuration option in .erdconfig |
I don't see why we couldn't add that! |
Whenever I opt for a format that is not DOT such as PDF and PNG I end up with something that looks like the image below:
I am running my code with the following Dockerfile:
Using the ERD configuration below:
And running the command
bundle exec erd
inside the running container. The DOT format works as expected. Any ideas what could be causing this?The text was updated successfully, but these errors were encountered: