This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from robofab.world import * | |
f = CurrentGlyph() | |
f.appendAnchor('XXX', (0, 0)) #Change XXX to whatever name you want | |
f.update() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Non Robofab add anchor | |
f = fl.glyph | |
NewAnchor = Anchor('XXX', 0, 0) | |
f.anchors.append(NewAnchor) | |
fl.UpdateFont() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.shortcuts import redirect | |
def anonymous_required(redirect_url): | |
""" | |
Decorator for views that allow only unauthenticated users to access view. | |
Usage: | |
@anonymous_required(redirect_url='company_info') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"description": "fontforge validation outputs error messages?", | |
"log_messages": [ | |
"ERROR: fontforge did print these messages to stderr:\nThe following table(s) in the font have been ignored by FontForge\n Ignoring 'DSIG' digital signature table\n" | |
], | |
"result": "ERROR", | |
"target": "/Users/marc/Documents/googlefonts/manual_font_cleaning/The-Lobster-Font/Lobster/Lobster-Regular.ttf" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
font = Glyphs.font | |
tallest = 0 | |
tallest_name = '' | |
deepest = 0 | |
deepest_name = '' | |
for i, master in enumerate(font.masters): | |
for glyph in font.glyphs: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
font = Glyphs.font | |
instances = font.instances | |
for instance in instances: | |
if 'Bold Italic' == instance.name: | |
instance.linkStyle = '' | |
print 'Removed Bold from Bold Italic linked style' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
from glob import glob | |
from fontTools.ttLib import TTFont | |
import re | |
NAME_SUFFIX = '_new' | |
NAME_ENTRIES = [ | |
(1, 0, 0), # Mac | |
(3, 1, 1033) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#MenuTitle: Find Family ymin and ymax | |
def shortest_tallest_glyphs(font, *args): | |
'''find the tallest and shortest glyphs in all masters from a list. | |
If no list is given, search all glyphs.''' | |
lowest = 0.0 | |
highest = 0.0 | |
highest_name = '' | |
lowest_name = '' | |
masters_count = len(font.masters) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Recrusively traverse a collection of fonts and find incorrect fsType and | |
macStyle values | |
fsType should always be 0x000 | |
macStyle values should map to the MACSTYLE constant | |
""" | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glyphsLib | |
import os | |
parent_dir = '/Users/marc/Documents/googlefonts/manual_font_cleaning/' | |
possible_var_fonts = [] | |
almost_possible_var_fonts = [] | |
for root, dirs, files in os.walk(parent_dir, topdown=False): | |
for f in files: |
OlderNewer