-
Notifications
You must be signed in to change notification settings - Fork 47
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
Font path seems to have been hardcoded for Mac? #12
Comments
+1 here on Ubuntu Really eager to build support for this in cfn-diagram |
Thank you for reporting issue! Yes. It was hardcoded. Work procedure:
|
Thank you for the update @ugwis ; hopefully those things will be implemented soon. And I'm not sure if "non-gui" Linux distributions will somehow include fonts (probably they do?!) And also the resources seem to be limited? For example, I tried to add |
In #19 I specified the path to the font on Linux and Windows. Font paths should not be hard-coded, but will be removed if we add an implementation that searches for font files by font name. I have confirmed that the Arial font is included in ttf-mscorefonts-installer, and it's possible to generate it even in a non-GUI environment with the latest commit.
Available resource types are still limited. we need to create a list of resource types. I added a workaround using presets for undefined resource types to #20. |
For distributions - such as Ubuntu - one can use the Liberation Fonts, as an alternative to Arial.ttf with this workaround :
@ugwis - if Arial.ttf is not found, could the code fall back to |
Thanks for your suggestion! @ojacques I'm not familiar with alternative fonts for Arial, but LiberationSans seems to be intended as an alternative to Arial and provided by many distributions (I Confirmed repositories provided by rpm, apt, alpine).
|
any updates on this thread, seeing the similar issue in Homebrew/homebrew-core#175896 |
@chenrui333 |
The code seems to do
os.Open("/Library/Fonts/Arial Unicode.ttf")
, which I think is only valid for a MacThe text was updated successfully, but these errors were encountered: