-
Notifications
You must be signed in to change notification settings - Fork 687
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 information missing in UnknownFont error message #1022
Comments
Please do! I just encountered this error, changed the file with your change, and now I know what the problem is. |
This just solved my problem as well, please add it to the repo! |
mojavelinux
added a commit
to mojavelinux/prawn
that referenced
this issue
Nov 8, 2017
- when an afm font is missing, provide more information to the user - look for font name in family option in case of missing TTF
mojavelinux
added a commit
to mojavelinux/prawn
that referenced
this issue
Nov 8, 2017
- when an afm font is missing, provide more information to the user - look for font name in family option in case of missing TTF
mojavelinux
added a commit
to mojavelinux/prawn
that referenced
this issue
Nov 8, 2017
- when an afm font is missing, provide more information to the user - look for font name in family option in case of missing TTF - add test to confirm error is raised and message is correct
mojavelinux
added a commit
to mojavelinux/prawn
that referenced
this issue
Nov 8, 2017
- when an afm font is missing, provide more information to the user - look for font name in family option in case of missing TTF - add test to confirm error is raised and message is correct
mojavelinux
added a commit
to mojavelinux/prawn
that referenced
this issue
Nov 8, 2017
- when an afm font is missing, provide more information to the user - look for font name in family option in case of missing TTF - add test to confirm error is raised and message is correct
mojavelinux
added a commit
that referenced
this issue
Nov 14, 2017
resolves #1022 provide more information about missing font
Added! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When a font cannot be found, users often see the following error message:
This happens when a font family + font style font combination is not found in the font registry. Prawn falls back to loading an AFM font. However, in this case, the name argument is always nil and the error message reports a blank font. All the font information is sitting in the options argument.
In afm.rb, I prose changing:
to
That way, the error message will be:
The message will be consistent whether it's the family or the family + style that can't be matched.
The text was updated successfully, but these errors were encountered: