Skip to content
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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ This repository is open to contributions of new glyph designs intended to be use
## Usage

### View Alternate Glyph Styles
The `*.glif` source files are located in the `glyphs` directory of this repository and are organized by Unicode code point. A short string is added to the Unicode code point to describe the type of design modification that was performed to the Hack default style. Source files are supplied for regular, bold, italic, and bold italic font variants.

You may view images of the alternate designs in the README.md files at the top level of each alternate glyph directory.
The `*.glif` source files are located in the `glyphs` directory of this repository. Each one is named to show the character modified along with a short string to describe the type of design modification that was performed to the Hack default style. Source files are supplied for regular, bold, italic, and bold italic font variants.

You may view images of the alternate designs in the README.md files at the top level of each alternate glyph directory or see an overview of all the modifications in README.md in the `glyphs` directory itself.

### How to Build a Custom Version of Hack

Expand Down Expand Up @@ -50,6 +49,8 @@ Alternatively, you can do the copying manually. Copy the alternate glyph source
#### Eliminate existing manual instruction sets for alternate glyphs (if present)
Some of the glyphs in the Hack sets include manual changes to the ttfautohint automated instruction sets ("hints"). These must be eliminated if you replace an existing glyph in the main Hack sets with a stylistic alternate from this repository or your build will fail (or create undesirable rendering changes that are not tuned for the alternate glyph).

This process is automated within the `patch-hack.sh` script but if you want to manually disable hints, keep reading.

The control instructions files that are used to manually modify the hints in the Hack builds are located in the [tt-hinting directory](https://github.com/source-foundry/Hack/tree/master/postbuild_processing/tt-hinting) of the Hack repository. There is one text file per Hack variant (i.e. for Regular, Italic, Bold, and Bold Italic sets). The manual hints are organized by Unicode code point.

Examine these control instructions files before you build your new fonts. If you identify a block of instructions under a heading for a Unicode code point that you intend to replace, either delete all lines associated with that glyph or comment out the block with `#` symbols at the beginning of each line.
Expand Down
68 changes: 68 additions & 0 deletions create-pngs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/bin/bash

set -euo pipefail

if [ $# -eq 0 ]; then
echo "Usage: create-pngs.sh PATH"
echo " Create transparent pngs with a consistent size for all, potentially, replaced"
echo " characters appropriate for uploading to the github alt-hack page."
echo ""
echo " PATH A Hack build directory containing Hack-{Regular,Bold,Italic,BoldItalic}.ttf files"
echo ""
echo "Image files are written to a pngs/ directory"
echo ""
echo "This tool depends on the \"convert\" tool from ImageMagick"
exit 1
fi

# Map each character to the glif name
declare -A chars=(
["&"]="ampersand"
[">"]="greater"
["<"]="less"
["f"]="f"
["ğ"]="gbreve"
["ǧ"]="gcaron"
["ĝ"]="gcircumflex"
["ġ"]="gdotaccent"
["g"]="g"
["ģ"]="uni0123"
["ı"]="dotlessi"
["í"]="iacute"
["ĭ"]="ibreve"
["î"]="icircumflex"
["ï"]="idieresis"
["i"]="i"
["ì"]="igrave"
["ī"]="imacron"
["į"]="iogonek"
["ĩ"]="itilde"
["і"]="uni0456"
["ї"]="uni0457"
["ĺ"]="lacute"
["ľ"]="lcaron"
["ŀ"]="ldot"
["l"]="l"
["ł"]="lslash"
["ļ"]="uni013C"
["1"]="one"
["("]="parenleft"
[")"]="parenright"
["%"]="percent"
["["]="bracketleft"
["]"]="bracketright"
["3"]="three"
["0"]="zero"
)

mkdir -p pngs

for char in "${!chars[@]}"; do
desc="${chars[$char]}"
for style in Regular Bold Italic BoldItalic; do
filename=./pngs/"${desc}"-"${style}".png
echo Creating "${filename}"
convert -font "${1}"/Hack-"${style}".ttf -background transparent -size 36x60\
label:"${char}" "${filename}"
done
done
20 changes: 20 additions & 0 deletions glyphs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

| Glyph | Original | alt-hack |
| ------------- | :--: | :--: |
| ampersand-nogap | ![ampersand](https://user-images.githubusercontent.com/23739434/75572160-872e5480-5a52-11ea-9a4b-f9c6a5b78dbb.png) | ![ampersand-nogap-Regular](https://user-images.githubusercontent.com/23739434/75802555-ca4f3700-5d74-11ea-9838-a31e512f1b71.png) |
| angle-brackets-wider | ![less](https://user-images.githubusercontent.com/23739434/75572334-a331f600-5a52-11ea-851d-9309830105f1.png)![greater](https://user-images.githubusercontent.com/23739434/75572228-931a1680-5a52-11ea-9318-5cfe3d9d471e.png) | ![less-wider-Regular](https://user-images.githubusercontent.com/23739434/75572342-a3ca8c80-5a52-11ea-81ad-25f40db37800.png)![greater-wider-Regular](https://user-images.githubusercontent.com/23739434/75572235-93b2ad00-5a52-11ea-8fb2-5d4c2dcf7fd1.png) |
| f-knife | ![f](https://user-images.githubusercontent.com/23739434/75572186-8bf30880-5a52-11ea-9b95-8dd9e2ba4658.png) | ![f-knife-Regular](https://user-images.githubusercontent.com/23739434/75572191-8d243580-5a52-11ea-978c-2170aaa5c65c.png) |
| g-loop | ![g](https://user-images.githubusercontent.com/23739434/75572193-8d243580-5a52-11ea-8e19-fb31c6b45741.png) | ![g-loop-Regular](https://user-images.githubusercontent.com/23739434/75572226-92818000-5a52-11ea-89db-a867763ae66f.png) |
| i-slab | ![i](https://user-images.githubusercontent.com/23739434/75572237-93b2ad00-5a52-11ea-9f28-6588e274c9a0.png) | ![i-slab-Regular](https://user-images.githubusercontent.com/23739434/75572301-9d3c1500-5a52-11ea-99cd-80401e0e4454.png) |
| l-slab | ![l](https://user-images.githubusercontent.com/23739434/75572310-9f05d880-5a52-11ea-9e8a-2cc108269023.png) | ![l-slab-Regular](https://user-images.githubusercontent.com/23739434/75572348-a4fbb980-5a52-11ea-86c4-9cec59415e77.png) |
| one-noslab | ![one](https://user-images.githubusercontent.com/23739434/75572360-a62ce680-5a52-11ea-9949-55af3f5c115a.png) | ![one-noslab-Regular](https://user-images.githubusercontent.com/23739434/75572365-a75e1380-5a52-11ea-82f8-d0ada608e41c.png) |
| parentheses-curved | ![parenleft](https://user-images.githubusercontent.com/23739434/75572366-a7f6aa00-5a52-11ea-8447-0185a64fe42f.png)![parenright](https://user-images.githubusercontent.com/23739434/75572378-aa590400-5a52-11ea-8801-ca2cd6b1510e.png) | ![parenleft-curved-Regular](https://user-images.githubusercontent.com/23739434/75572371-a88f4080-5a52-11ea-9c87-bca5a499747e.png)![parenright-curved-Regular](https://user-images.githubusercontent.com/23739434/75572384-ab8a3100-5a52-11ea-8d0f-41cd7856e3e6.png) |
| parentheses-rounder | ![parenleft](https://user-images.githubusercontent.com/23739434/75572366-a7f6aa00-5a52-11ea-8447-0185a64fe42f.png)![parenright](https://user-images.githubusercontent.com/23739434/75572378-aa590400-5a52-11ea-8801-ca2cd6b1510e.png) | ![parenleft-rounder-Regular](https://user-images.githubusercontent.com/23739434/75572376-aa590400-5a52-11ea-8fc9-51d99b0f14e3.png)![parenright-rounder-Regular](https://user-images.githubusercontent.com/23739434/75572389-ac22c780-5a52-11ea-85da-ed62ccce1699.png) |
| percent-traditional | ![percent](https://user-images.githubusercontent.com/23739434/75572391-acbb5e00-5a52-11ea-9c4e-7e6088a4078b.png) | ![percent-traditional-Regular](https://user-images.githubusercontent.com/23739434/75572396-ad53f480-5a52-11ea-8510-69b03a0bacf8.png) |
| square-brackets-oldv3 | ![bracketleft](https://user-images.githubusercontent.com/23739434/75572166-885f8180-5a52-11ea-93d4-0a4d744709fe.png)![bracketright](https://user-images.githubusercontent.com/23739434/75572174-8990ae80-5a52-11ea-87c3-74448dc3a207.png) | ![bracketleft-oldv3-Regular](https://user-images.githubusercontent.com/23739434/75572172-8990ae80-5a52-11ea-89c1-d5e9f3ca7c97.png)![bracketright-oldv3-Regular](https://user-images.githubusercontent.com/23739434/75572179-8ac1db80-5a52-11ea-9214-4df9651949ed.png) |
| three-flattop | ![three](https://user-images.githubusercontent.com/23739434/75572397-adec8b00-5a52-11ea-826f-b957ab0cc7ee.png) | ![three-flattop-Regular](https://user-images.githubusercontent.com/23739434/75572402-ae852180-5a52-11ea-9d88-2b67b2cc34c0.png) |
| zero-backslash | ![zero](https://user-images.githubusercontent.com/23739434/75572430-b3e26c00-5a52-11ea-97e4-bc9c5678f458.png) | ![zero-backslash-Regular](https://user-images.githubusercontent.com/23739434/75572435-b5139900-5a52-11ea-8e1a-c76869842da1.png) |
| zero-diamond | ![zero](https://user-images.githubusercontent.com/23739434/75572430-b3e26c00-5a52-11ea-97e4-bc9c5678f458.png) | ![zero-diamond-Regular](https://user-images.githubusercontent.com/23739434/75572441-b5ac2f80-5a52-11ea-9b15-5997a0ab3949.png) |
| zero-dotted | ![zero](https://user-images.githubusercontent.com/23739434/75572430-b3e26c00-5a52-11ea-97e4-bc9c5678f458.png) | ![zero-dotted-Regular](https://user-images.githubusercontent.com/23739434/75572447-b6dd5c80-5a52-11ea-952c-813d4d35f430.png) |
| zero-forwardslash | ![zero](https://user-images.githubusercontent.com/23739434/75572430-b3e26c00-5a52-11ea-97e4-bc9c5678f458.png) | ![zero-forwardslash-Regular](https://user-images.githubusercontent.com/23739434/75572456-b80e8980-5a52-11ea-9bf8-d48d11831a0a.png) |

8 changes: 8 additions & 0 deletions glyphs/ampersand-nogap/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
![ampersand-nogap-Regular](https://user-images.githubusercontent.com/23739434/75802555-ca4f3700-5d74-11ea-9838-a31e512f1b71.png)

![ampersand-nogap-Italic](https://user-images.githubusercontent.com/23739434/75802553-ca4f3700-5d74-11ea-9e52-271e4b9cc6ce.png)

![ampersand-nogap-Bold](https://user-images.githubusercontent.com/23739434/75802548-c9b6a080-5d74-11ea-8a18-2389f0dce149.png)

![ampersand-nogap-BoldItalic](https://user-images.githubusercontent.com/23739434/75802551-ca4f3700-5d74-11ea-87a4-f1b2cddd2355.png)

94 changes: 94 additions & 0 deletions glyphs/ampersand-nogap/bold/ampersand.glif
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<?xml version="1.0"?>
<glyph name="ampersand" format="1">
<advance width="1233"/>
<unicode hex="0026"/>
<outline>
<contour>
<point x="805.252" y="100.695" type="line"/>
<point x="705.584" y="30.7996"/>
<point x="576.593" y="-20.5498"/>
<point x="411.924" y="-20.5498" type="curve" smooth="yes"/>
<point x="226.593" y="-20.5498"/>
<point x="100.121" y="46.6925"/>
<point x="42.3105" y="169.537" type="curve" smooth="yes"/>
<point x="14.9121" y="227.763"/>
<point x="1.21094" y="293.865"/>
<point x="1.21094" y="367.845" type="curve" smooth="yes"/>
<point x="1.21094" y="451.415"/>
<point x="20.7344" y="527.45"/>
<point x="59.7793" y="595.95" type="curve" smooth="yes"/>
<point x="98.8242" y="664.45"/>
<point x="161.762" y="732.265"/>
<point x="249.168" y="799.395" type="curve"/>
<point x="219.029" y="840.495"/>
<point x="189.643" y="889.13"/>
<point x="161.01" y="945.3" type="curve" smooth="yes"/>
<point x="132.377" y="1001.47"/>
<point x="118.346" y="1065.86"/>
<point x="118.346" y="1138.47" type="curve" smooth="yes"/>
<point x="118.346" y="1246.7"/>
<point x="151.213" y="1331.64"/>
<point x="217.521" y="1393.29" type="curve" smooth="yes"/>
<point x="283.83" y="1454.94"/>
<point x="371.988" y="1485.76"/>
<point x="482" y="1485.76" type="curve" smooth="yes"/>
<point x="706.865" y="1485.76"/>
<point x="859.504" y="1375.17"/>
<point x="859.504" y="1159.02" type="curve" smooth="yes"/>
<point x="859.504" y="1091.89"/>
<point x="837.275" y="1025.1"/>
<point x="792.818" y="958.657" type="curve" smooth="yes"/>
<point x="748.361" y="892.213"/>
<point x="686.951" y="826.11"/>
<point x="608.588" y="760.35" type="curve"/>
<point x="812.033" y="517.86" type="line"/>
<point x="845.678" y="595.506"/>
<point x="876.838" y="686.899"/>
<point x="891.15" y="774.735" type="curve"/>
<point x="1174.25" y="774.735" type="line"/>
<point x="1163.29" y="693.905"/>
<point x="1144.11" y="611.705"/>
<point x="1116.71" y="528.135" type="curve" smooth="yes"/>
<point x="1087.06" y="444.565"/>
<point x="1047.12" y="367.16"/>
<point x="997.395" y="295.92" type="curve"/>
<point x="1231.79" y="0" type="line"/>
<point x="886.631" y="0" type="line"/>
</contour>
<contour>
<point x="497.824" y="1286.43" type="curve" smooth="yes"/>
<point x="424.039" y="1286.43"/>
<point x="389.318" y="1233.71"/>
<point x="389.318" y="1154.91" type="curve" smooth="yes"/>
<point x="389.318" y="1070.29"/>
<point x="424.328" y="998.867"/>
<point x="457.135" y="947.355" type="curve"/>
<point x="496.316" y="977.495"/>
<point x="529.471" y="1010.03"/>
<point x="556.596" y="1044.97" type="curve" smooth="yes"/>
<point x="583.723" y="1079.9"/>
<point x="597.285" y="1119.29"/>
<point x="597.285" y="1163.13" type="curve" smooth="yes"/>
<point x="597.285" y="1236.18"/>
<point x="565.731" y="1286.43"/>
</contour>
<contour>
<point x="278.555" y="386.34" type="curve" smooth="yes"/>
<point x="278.555" y="343.87"/>
<point x="292.871" y="305.51"/>
<point x="321.506" y="271.26" type="curve" smooth="yes"/>
<point x="350.139" y="237.01"/>
<point x="392.334" y="219.885"/>
<point x="448.094" y="219.885" type="curve" smooth="yes"/>
<point x="534.959" y="219.885"/>
<point x="600.493" y="254.401"/>
<point x="651.537" y="295.92" type="curve"/>
<point x="407.404" y="604.17" type="line"/>
<point x="366.715" y="569.92"/>
<point x="335.066" y="536.354"/>
<point x="312.463" y="503.475" type="curve" smooth="yes"/>
<point x="289.857" y="470.595"/>
<point x="278.555" y="431.55"/>
</contour>
</outline>
</glyph>
109 changes: 109 additions & 0 deletions glyphs/ampersand-nogap/bolditalic/ampersand.glif
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<?xml version="1.0"?>
<glyph name="ampersand" format="1">
<advance width="1233"/>
<unicode hex="0026"/>
<outline>
<contour>
<point x="755.272" y="100.695" type="line"/>
<point x="643.28" y="30.7998"/>
<point x="505.234" y="-20.5498"/>
<point x="340.565" y="-20.5498" type="curve" smooth="yes"/>
<point x="155.234" y="-20.5498"/>
<point x="40.6191" y="46.6924"/>
<point x="4.46973" y="169.537" type="curve" smooth="yes"/>
<point x="-5.25684" y="202.595"/>
<point x="-10.1201" y="238.192"/>
<point x="-10.1201" y="276.328" type="curve" smooth="yes"/>
<point x="-10.1201" y="305.362"/>
<point x="-7.30176" y="335.867"/>
<point x="-1.66309" y="367.845" type="curve" smooth="yes"/>
<point x="13.0723" y="451.415"/>
<point x="46.0029" y="527.45"/>
<point x="97.126" y="595.95" type="curve" smooth="yes"/>
<point x="148.25" y="664.45"/>
<point x="223.145" y="732.265"/>
<point x="322.388" y="799.395" type="curve"/>
<point x="299.496" y="840.495"/>
<point x="278.686" y="889.13"/>
<point x="259.956" y="945.3" type="curve" smooth="yes"/>
<point x="248.914" y="978.416"/>
<point x="243.452" y="1014.39"/>
<point x="243.452" y="1053.22" type="curve" smooth="yes"/>
<point x="243.452" y="1080.25"/>
<point x="246.1" y="1108.67"/>
<point x="251.354" y="1138.47" type="curve" smooth="yes"/>
<point x="270.438" y="1246.7"/>
<point x="318.282" y="1331.64"/>
<point x="395.461" y="1393.29" type="curve" smooth="yes"/>
<point x="472.64" y="1454.94"/>
<point x="566.233" y="1485.76"/>
<point x="676.245" y="1485.76" type="curve" smooth="yes"/>
<point x="875.405" y="1485.76"/>
<point x="1002.61" y="1399.01"/>
<point x="1002.61" y="1229" type="curve" smooth="yes"/>
<point x="1002.61" y="1207.06"/>
<point x="1000.49" y="1183.73"/>
<point x="996.135" y="1159.02" type="curve" smooth="yes"/>
<point x="984.299" y="1091.89"/>
<point x="950.294" y="1025.1"/>
<point x="894.12" y="958.657" type="curve" smooth="yes"/>
<point x="837.947" y="892.213"/>
<point x="764.882" y="826.11"/>
<point x="674.923" y="760.35" type="curve"/>
<point x="835.611" y="517.86" type="line"/>
<point x="882.946" y="595.506"/>
<point x="930.222" y="686.899"/>
<point x="960.022" y="774.735" type="curve"/>
<point x="1243.12" y="774.735" type="line"/>
<point x="1217.91" y="693.905"/>
<point x="1184.23" y="611.705"/>
<point x="1142.1" y="528.135" type="curve" smooth="yes"/>
<point x="1097.71" y="444.565"/>
<point x="1044.13" y="367.16"/>
<point x="981.838" y="295.92" type="curve"/>
<point x="1164.05" y="0" type="line"/>
<point x="818.896" y="0" type="line"/>
</contour>
<contour>
<point x="656.921" y="1286.43" type="curve" smooth="yes"/>
<point x="566.645" y="1286.43"/>
<point x="520.414" y="1205.08"/>
<point x="520.414" y="1100.1" type="curve" smooth="yes"/>
<point x="520.414" y="1039.29"/>
<point x="538.035" y="987.327"/>
<point x="556.444" y="947.355" type="curve"/>
<point x="600.94" y="977.495"/>
<point x="639.832" y="1010.03"/>
<point x="673.116" y="1044.97" type="curve" smooth="yes"/>
<point x="706.403" y="1079.9"/>
<point x="726.911" y="1119.29"/>
<point x="734.642" y="1163.13" type="curve" smooth="yes"/>
<point x="736.919" y="1176.04"/>
<point x="738.084" y="1188.25"/>
<point x="738.084" y="1199.58" type="curve" smooth="yes"/>
<point x="738.084" y="1252.38"/>
<point x="712.822" y="1286.43"/>
</contour>
<contour>
<point x="278.941" y="386.34" type="curve" smooth="yes"/>
<point x="277.078" y="375.769"/>
<point x="276.146" y="365.451"/>
<point x="276.146" y="355.389" type="curve" smooth="yes"/>
<point x="276.146" y="325.027"/>
<point x="284.631" y="296.984"/>
<point x="301.602" y="271.26" type="curve" smooth="yes"/>
<point x="324.194" y="237.01"/>
<point x="363.37" y="219.885"/>
<point x="419.13" y="219.885" type="curve" smooth="yes"/>
<point x="505.995" y="219.885"/>
<point x="577.616" y="254.4"/>
<point x="635.98" y="295.92" type="curve"/>
<point x="446.2" y="604.17" type="line"/>
<point x="399.472" y="569.92"/>
<point x="361.905" y="536.354"/>
<point x="333.504" y="503.475" type="curve" smooth="yes"/>
<point x="305.101" y="470.595"/>
<point x="286.913" y="431.55"/>
</contour>
</outline>
</glyph>
Loading