-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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-patcher: Check if glyph source is available (--glyphdownload
)
#741
Conversation
Two notes:
If we go the route with the second commit there might be problems of |
--glyphdownload
)
[why] People might want to use the font-patcher with just the one script file. The error message does not help them to understand the problem. [how] Require the modules only if the user wants to use it (i.e. --makegroups). Give the expected path in the error message. We could also download the missing files instead, similar to #741 But that PR did not get any feedback yet, so I do not know if this is something we want. Anyhow, the fetching of missing parts should then be unified for both usecases (i.e. Fontname* and src/glyphs). And then, there is font-patcher.zip (which needs to be adapted), maybe that is the way to go. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why] People might want to use the font-patcher with just the one script file. The error message does not help them to understand the problem. [how] Require the modules only if the user wants to use it (i.e. --makegroups). Give the expected path in the error message. We could also download the missing files instead, similar to #741 But that PR did not get any feedback yet, so I do not know if this is something we want. Anyhow, the fetching of missing parts should then be unified for both usecases (i.e. Fontname* and src/glyphs). And then, there is font-patcher.zip (which needs to be adapted), maybe that is the way to go. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why] People might want to use the font-patcher with just the one script file. The error message does not help them to understand the problem. [how] Require the modules only if the user wants to use it (i.e. --makegroups). Give the expected path in the error message. We could also download the missing files instead, similar to #741 But that PR did not get any feedback yet, so I do not know if this is something we want. Anyhow, the fetching of missing parts should then be unified for both usecases (i.e. Fontname* and src/glyphs). And then, there is font-patcher.zip (which needs to be adapted), maybe that is the way to go. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why] People might want to use the font-patcher with just the one script file. The error message does not help them to understand the problem. [how] Require the modules only if the user wants to use it (i.e. --makegroups). Give the expected path in the error message. We could also download the missing files instead, similar to #741 But that PR did not get any feedback yet, so I do not know if this is something we want. Anyhow, the fetching of missing parts should then be unified for both usecases (i.e. Fontname* and src/glyphs). And then, there is font-patcher.zip (which needs to be adapted), maybe that is the way to go. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why] When users just download the script (and not the source glyphs) the script fails with an obscure error message. [how] Check if the glyphdir exists at all. If not give a hint to download the glyphs. Check if the individual glyph font exists and is readable. Bail out if not. [note] Cherry picked, was part of #741 Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
d09e346
to
3dad8c1
Compare
Rebase on master, force push. One of the original commits is already in master. |
All readme files need to be corrected 🛑 |
Does this download the |
[why] People often just download the font-patcher script and then the patching fails because the symbol glyphs are missing. A typical comment is that a complete git clone is needed in that case, which is rediculous bandwidth. Just downloading the needed files seems rather complicated. [how] Add option --glyphdownload that (tries to) download just the needed glyph files. This is just bare basic stuff. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
3dad8c1
to
8c16442
Compare
I believe we should promote the |
[why] People might want to use the font-patcher with just the one script file. The error message does not help them to understand the problem. [how] Require the modules only if the user wants to use it (i.e. --makegroups). Give the expected path in the error message. We could also download the missing files instead, similar to ryanoasis#741 But that PR did not get any feedback yet, so I do not know if this is something we want. Anyhow, the fetching of missing parts should then be unified for both usecases (i.e. Fontname* and src/glyphs). And then, there is font-patcher.zip (which needs to be adapted), maybe that is the way to go. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why] When users just download the script (and not the source glyphs) the script fails with an obscure error message. [how] Check if the glyphdir exists at all. If not give a hint to download the glyphs. Check if the individual glyph font exists and is readable. Bail out if not. [note] Cherry picked, was part of ryanoasis#741 Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When users just download the script (and not the source glyphs) the
script fails with an obscure error message.
[how]
Check if the glyphdir exists at all. If not give a hint to download the
glyphs.
Check if the individual glyph font exists and is readable. Bail out if
not.
Add option
--glyphdownload
that tries to download missing glyph fonts.Requirements / Checklist
What does this Pull Request (PR) do?
Add checks before we open a symbol font and give hints to the users if we can not.
How should this be manually tested?
src/glyphs/
(or use--glyphdir
), patch a font again (errors out)The two bottom cases a meaningful message should be printed.
--glyphdownload
. (all shall work)Any background context you can provide?
For example #659 #662 #495
What are the relevant tickets (if any)?
Screenshots (if appropriate or helpful)
Edit: Add
--glyphdownload
as that has been added as 2nd commit to the PR