-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
PR: [WIP] update_font script #194
base: master
Are you sure you want to change the base?
Conversation
Hi @kumattau thank you for all the work on this !! After a quick review I think it could be nice to have this in the Furthermore, seeing that each font can potentially implement it's own logic if needed as done for FontAwesome5. I think this work kind off standarizes and makes available an utility command to update all the fonts available in a more in context way that using However, just in case, what do you think @ccordoba12 ? Do you know if is there any reason to keep using the current approach with |
I added --cmapfmt option for more charmap formatting.
|
Thank you for feedback @dalthviz, I will try console_scripts ! Related to #188 (comment), To add new font, I think it is easiest to stop defining the source code In addition, since the directory is divided by prefix, you can use the original font file name as it is, For example, prefix "ph" defintion is detected from directory structure.
|
Probably because we were more familiar with |
distutils in qtawesome can be replaced with setuptools. I sent PR #199. |
I think the traditional command should be supported for a few versions after the release of the update_font script to allow for a migration period. The point I was trying to make is that the discontinuation of distutils is not a reason to discontinue the traditional commands, because distutils can be replaced with setuptools. I like script, but I cannot answer which best, because I have not been able to compare it sufficiently with traditional commands. This PR is still WIP, so I think applying #199 won't lose anything. |
Ok @kumattau I will check PR #199 👍 Although I think that at the end we will need to remove the current subclasses in favor of the script here. Maybe we could check if makes sense to make the |
Information sharing.
https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html#prefer-setuptools
https://www.python.org/dev/peps/pep-0632/
|
I think it is better not to specify update_font.py in console_scrtipts. console_scripts installs the specified script as user's script in the directory like as /usr/bin or $HOME/.local/bin,
|
That makes sense, actually I think that it would be better to have it as a |
Hi @dalthviz @ccordoba12
related to #188, #189, #191
This is a draft of the update_font.
For example,
(1) Codicon is updated to the latest release (0.0.26)
(2) FontAwesome5 Brands is updated to the master branch version
(3) Material Design Icons is updated to the v6.5.95 with default font patching
The update_font.py can update the corresponding font for each prefix.
The following options can be specified.
As default, font family is renamed to f"qta+{md5sum(font)[:6]}@<original family>".
If you don't mind a lot of diffs, by update_font.py with --prefix and --version, all fonts can be updated without collide.
I think it is defficult for this update_font.py to merge to setupbase.py keeping compatibility.
In setupbase.py, FontAwesome5 zip is downloaded and processed but this is much special than other fonts.
So, I changed that, in update_font.py, FontAwesome5 ttf is downloaded and processed same as other fonts.
Could you try it and give me some feedback?