Presented at TypeLab 2023.
A much better version is now available at https://gist.github.com/arrowtype/47937ba868b0b2a49e80684319e56037
""" | |
This script requires some edits to be useful. Originally written for proofing Name Sans. | |
Demoed at https://www.youtube.com/watch?v=3a9KIPi_rTU | |
MIT License. Go ahead and use it! | |
Goals: | |
- Test `T` and `T.ultra` against basic lowercase: `TaTbTcT` etc, across full designspace, and especially around where it swaps to `T.ultra` | |
- Test `T` and `T.ultra` against relatively common diacritics |
""" | |
Script to create an image of a glyph in the current layer. | |
Instructions: | |
- Use within the Drawbot plugin of GlyphsApp. | |
- Get this plugin via Window > Plugin Manager, then search for "Drawbot" and install it. | |
- Then, go to File > New Drawbot, and paste in this code and run it. | |
- You may need to restart glyphs for the Plugin to work. | |
# menutitle: Remove Overlap in Selected Contours | |
# shortcut: control+command+o | |
g = CurrentGlyph() | |
with g.undo("Remove overlap"): | |
d_glyph = g.asDefcon() | |
sel = d_glyph.selection | |
sel.removeOverlap() |
""" | |
A script to set ufo2ft filters for all fonts in a directory. | |
DIRECTIONS: Set up the dict below with filters you would like to use in your UFO builds. Then, run it in the command | |
line like this, replacing the <content surrounded by angle brackets> with relavent paths: | |
python3 "<path_to_this_script>/add-ufo2ft-filters-to-ufos_in_dir.py" "<path_to_a_folder_containing_UFO_fonts>" | |
See https://github.com/googlefonts/fontmake/blob/a4c83a0693ae7c629db9385a9e68d8641d85718e/USAGE.md#outline-filtering | |
for more information. |
Copyright 2020 Arrow Type / Stephen Nixon | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR |
<?xml version='1.0' encoding='UTF-8'?> | |
<designspace format="5.0"> | |
<axes elidedfallbackname="Regular"> | |
<axis tag="opsz" name="Optical Size" minimum="8" maximum="72" default="8"> | |
<labelname xml:lang="en">Optical Size</labelname> | |
<map input="72" output="72"/> | |
<map input="20" output="40"/> | |
<map input="8" output="8" name="Text" elidable="true"/> | |
</axis> | |
<axis tag="wght" name="Weight" minimum="1" maximum="1000" default="700"> |
Presented at TypeLab 2023.
A much better version is now available at https://gist.github.com/arrowtype/47937ba868b0b2a49e80684319e56037
""" | |
From | |
https://github.com/arrowtype/recursive/blob/eb821735e66402b4b485ce97ed32b09a8555341e/src/build-scripts/make-release/compute-remaining-unicodes-in-font.py | |
The FontTools Subsetter expects unicode ranges for *inclusion*, but | |
often you just know which ranges you want to *exclude* from a font subset. | |
So, this script will accept a font, then report what Unicode values | |
it includes *beyond* given Unicode ranges. |
""" | |
A basic example of how to open a UFO and print out the bezier curve values from a glyph. | |
Example expanded from: | |
https://fonttools.readthedocs.io/en/latest/pens/recordingPen.html | |
Requires FontTools and FontParts. | |
""" | |
from fontParts.fontshell import RFont as Font |
function zipit { | |
currentDir=$(pwd) # get current dir so you can return later | |
cd $(dirname $1) # change to target’s dir (works better for zip) | |
target=$(basename $1) # get target’s name | |
zip -r $target.zip $target -x '*/.DS_Store' # make a zip of the target, excluding macOS metadata | |
echo "zip made of " $1 # announce completion | |
cd $currentDir # return to where you were | |
} |