Skip to content

Instantly share code, notes, and snippets.

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'
@m4rc1e
m4rc1e / gist:a0c2f20247c2c509853bb4d2a26c6baf
Created September 20, 2016 19:33
Glyphsapp: Tallest and Deepest glyph in all masters
font = Glyphs.font
tallest = 0
tallest_name = ''
deepest = 0
deepest_name = ''
for i, master in enumerate(font.masters):
for glyph in font.glyphs:
@m4rc1e
m4rc1e / .json
Created September 7, 2016 21:37
[
{
"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"
},
@m4rc1e
m4rc1e / django-anonymous-required.py
Created June 27, 2016 08:56
Django decorator for views that allow only unauthenticated users to access view.
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')
#Non Robofab add anchor
f = fl.glyph
NewAnchor = Anchor('XXX', 0, 0)
f.anchors.append(NewAnchor)
fl.UpdateFont()
from robofab.world import *
f = CurrentGlyph()
f.appendAnchor('XXX', (0, 0)) #Change XXX to whatever name you want
f.update()