-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Directory redesign and some new glyphs #47
base: master
Are you sure you want to change the base?
Conversation
Thank you very much for this PR Barry. I really appreciate your efforts here. This is an enormous amount of work and is going to take me a bit of time to get through it. I fixed the CI tests and it looks like there are a few issues that shellcheck is pointing out in the shell script. Let's wait on addressing them until I have an opportunity to work through all of your changes. Will you please confirm the sources of all of your new designs here? Are these derivatives of an upstream typeface (e.g. Droid Sans Mono)? We'll need to confirm that the licensing is ok on anything that is coming into the repository from other code bases. I really appreciate all of this. I'll take a look through it as soon as I can! |
Thanks for getting back to me, I appreciate you're busy on other projects! The percent and ampersand came from Noto Sans Mono, because that font has a bold variant so I didn't have to do extra work to create those. The 'g' came from Droid Sans which has a bold variant, even though Droid Sans Mono does not. I expanded the glyphs by 10% to make them the correct width for the monospace version. I extended the bottom left part of the 'l' glyphs myself to create the slab 'l'. I manually applied transformations in FontForge to create all of the italic and bolditalic variations. Since I submitted the pull request, I've discovered the Hack dev branch, so I can see that the parentheses questions have been answered. Given that parentheses-curved has been incorporated into the dev branch, I think we should remove parentheses-rounder and put a comment against parentheses-curved to say it is the same version as the dev branch. Once the dev branch is merged into master, we can remove parentheses from alt-hack as there will no longer be any difference. We could create parentheses-oldv3 in case anyone wants to use the old glyphs, I suppose. The prebuilt ttfs I've included do not have hinting applied. On Linux it makes no difference (assuming you're using the default settings of slight hinting). On Windows, I find the ttfautohint settings cause the whole font to be a bit taller which looks a bit strange to me! I believe there have been some issues reported against this behaviour. It doesn't happen if I use FontForge hinting (basically following this guide: https://github.com/fontforge/fontforge/wiki/How-TT-Hinting-Works). I'm not sure if it's a good idea to add ttfautohint hinting to these or not. I'm using shellcheck 0.6.0 (the latest on Ubuntu 19.10) and I can't make it emit the warnings semaphore is producing, even with the minimum severity. I also don't agree that the quotes in "${1}" do nothing, as ${1} could be a path containing spaces. It would be great to get the Hack dev branch merged into master so the new glyphs were available in the default build directory. It would also mean the updated hinting scripts were available for someone trying to build from the master branch. |
Hello, I had a prototype setup to compile with Common Lisp at https://github.com/equwal/alt-hack. I didn't use the shell because I really hate writing shell scripts. I was about to try to make it into a shell script when I saw this. One recommendation I can make from my experience is accepting formatting types as options like this: ./patch-hack.sh --ttf --woff --woff2 slabi Since most of the time you don't need all three (programmers don't need the web fonts normally). You might assist the maintainer a bit by separating this into two pull requests:
Or some other configuration. It is best to do one thing per submission to avoid overloading the maintainer. Also, you should rewrite that history and remove your /home/barry from the first commit. |
…all variants of g with a loop; all variants of l with a slab
- allow HACK_PATH to be provided as an environment variable - allow replacement glyphs to be provided as command-line arguments - automatically replace hinting rules for modified glyphs Update README.md to describe some of the changes to the repository. Added create-pngs.sh to create transparent pngs with a consistent size for all modified characters of a given font set. This should help a developer produce pngs suitable for use on the alt-hack github site.
…ronment and build the whole font from scratch for some simple variations.
Hi Thanks for taking the time to look at the pull request! I've rewritten the commit history to remove the erroneous directly inclusion, as scary as it is to alter the history of a public repository! The patch-hack.sh script already takes glyphs on the command-line, so
will just patch those two glyphs. I can't do anything about which fonts are built (ttf, woff etc) because that's not part of alt-hack. Once the glyphs have been modified, you can run I appreciate why you might want to split this into two pull requests. The new glyphs are a different concern to the updated directory and build scheme. Unfortunately, it's a huge amount of work to do that! I would have to repackage all of my glyphs into the old directory style in order to submit just the new glyphs. And then submit a pull request just for renaming the old glyphs and the new directory structure. Only when both pull requests had been applied could I then combine them to produce this request. |
It isn't like there is a community of people having to force pull your
I probably should have perceived that before I made by suggestion; you
Actually, Hack's makefile does it for you:
That is okay if you don't want to do that, maybe I will take up that https://github.com/equwal/alt-hack/blob/master/generator.ros As you can see at the top of the tree, it used Hack as a submodule to do it. However, that prototype is in Common Lisp and is itself a pain to build |
Now that I've been hacking on my cheap script for about six months, I'm firmly against any changes that will make it stop working! So I hope you might abandon this pull request so I don't end up with additional work. |
The main goal of my pull request was to provide the extra glyphs: ampersand-nogap, g-loop, l-slab and percent-traditional. The other changes just make it easier to navigate the repository, see all the alternative glyphs in one place, more easily build variants from the command-line etc. If you have a better solution for any of those tasks, feel free to submit your own code for consideration. Bear in mind, it should be possible to add new alternatives to your solution, in order that my glyph variants can be included. I can see you've created a website hosting many combinations of the existing glyph variants. As a casual user, you would still have to navigate through the alt-hack repository to see the variations, decide which you were interested in and hope you'd built that exact combination. Rather than build and host every variant, it might be worth concentrating on something similar to the Input font, which allows you to select variations, preview them and then download them as a custom font, https://input.fontbureau.com/preview. This would be the gold standard for downloading alternatives. I have no intention of abandoning my pull request because I believe the new glyphs are a valuable addition to the repository. I use a modified version of Hack every day (available as a pre-built configuration here: https://github.com/barrycohen/alt-hack/tree/master/prebuilt/hack-droid). |
Actually, I built every possible combination and plan to keep doing that unless enough alternative glyphs are added that this becomes impractical.
Yes, but I think the cardinality of the combination space was 236 fonts; not very many yet. Of course that is really cool and preferable to just hosting a giant font list. Before I started hosting them I had people asking me to build fonts for them because of how absurd the Hack build process is.
I still think you should split this up, otherwise you will end up having to be a permanent fork. And mostly I was trying to make a joke, I think there are good ideas in here. |
Sure, I think your tool and website are beneficial to people who want a specific build of the font but don't want to build it themselves. Kudos for going to the effort of building and hosting all the variations! If my alternative glyphs were included, the number of combinations would be 2362222 = 3776. It might be worth figuring out how they do it for Input! At this stage, I would say it's up to the alt-hack repository owner to decide which fork to merge and how they wish the build process to work. As we discussed in September, it would be a lot of work to separate this into two requests, and then further work to recombine it back into a single request if both were accepted. |
I made a similar analysis, but that is still only about 5Gb of space. I have 25Gb of space on my dirt-cheap VPS. I suppose more than that would be a problem because it would cost additional money. For now I would consider a simple image displaying each font as a solution proportionate to the problem. |
I've had a little play around with adding stylistic alternates. The results are here: https://jsfiddle.net/bx68ye7h/1/. In case the fiddle stops working, it shows two buttons which allow you to toggle some of the font glyphs (just like the radio buttons for the Input font preview). The idea is to create a single font which contains all of the glyphs. The custom font used in the fiddle contains alternate versions of the '3' and 'f' which can be toggled with alternate styles 'ss01' and 'ss02'. If someone wants a build with certain replacements by default, you just have to modify the glyph codes within the base font with the alternative glyph names (e.g. 0x66 -> "f_knife" instead of "f"). This is a trivial operation compared to rebuilding the entire font from scratch and so could be done on a webserver to provide a customised download. I think that's probably the way forward, but it's a lot of work! |
Well, it doesn't work for me as it is.
This is really clever!
This is why I'm not going to be maintaining such a thing on my site (though I would accept a simple image showing different fonts), because I don't want to have to maintain a complex javascript thing. Cheers to you or anyone who wants to do that. In the event that such a thing was about as simple as an input form/POST request I guess I wouldn't mind it. |
Well, if you change your mind and make a fork with your new variants that doesn't change the directory tree, I'll also host them. |
Creating a repository which just contains the new glyphs wasn't too hard. Please see https://github.com/barrycohen/alt-hack-new-glyphs. |
First of all, thanks for making Hack! It's an awesome font and the only thing that's come close to dragging me away from Droid Sans Mono for decades. It corrects problems I didn't even realise Droid had. Bold and italic variants, non-joining underscores, more legible comma, colon, semicolon and tilde etc.
Unfortunately, I've become indoctrinated to some of the glyphs in Droid so I couldn't seem to get comfortable with a curved 'i' and 'l', a '0' with a vertical line in it etc. I was excited to discover alt-hack and decided, with a bit of work, I could make my perfect programming font and maybe help others do the same.
alt-hack is a bit cumbersome to use because you have to know your u0457 from your u0069. The readme's help, of course, but you still have go through each directory and then select the glyphs one by one in
patch-hack.sh
.I've shuffled all the files around so the directories now describe the change they make and can contain updates to several characters at once. Given that
patch-hack.sh
copies*.glif
, this works seamlessly. So now you just have to selecti-slab
and all of the 'i'-like characters will be modified. I can't think of a scenario where someone might want 'iacute' with a slab and 'idieresis' without, but I may be missing a design decision.Next, I've modified
patch-hack.sh
so it can be used from the command-line without modifying the tool, e.g.I've also added a small section to automatically remove tt-hinting for modified glyphs by extracting the unicode hex code from the
.glif
file and commenting out any matching lines fromtt-hinting/Hack-*-TA.txt
from the Hack repository.To satisfy my desire to create a better Droid Sans Mono, I've added a traditional percent sign, and ampersand without a gap, slabbed 'l' characters and 'g' characters with a bottom loop.
I've added a little script,
create-pngs.sh
, to help people create transparent.png
files at a consistent size if they want to modify or add any glyphs to the alt-hack repository and I've popped aREADME.md
in the base glyphs directory so you can see all of the variations at a glance. This script and the modifications topatch-hack.sh
both passshellcheck
.Finally, I've added some prebuilt
.ttf
variations with comparison sample images so people don't have to create a build environment and work out how to run shell scripts to get the most common modifications. One of the variations I've renamed to Hack Droid, which is now my daily font.While staring at the glyphs in detail, I've noticed a few extra things which it would be nice to address someday:
square-brackets-oldv3
around, but it's not doing any harm!one-noslab
is great, but really we should also modifysuperscriptone
,onequarter
,onehalf
etc.