Skip to content

Instantly share code, notes, and snippets.

View graphicore's full-sized avatar
🎯
Focusing then blurring again …

Lasse Fister graphicore

🎯
Focusing then blurring again …
View GitHub Profile
#! /usr/bin/env python
import json
from robofab import glifLib2
class Glyph (object):
def __init__(self):
self.outline = [];
def getPen(self):
return OutlinePen(self.outline)
@graphicore
graphicore / proxy-whitelist.js
Last active August 29, 2015 14:06
direct proxies as whitelists
require('harmony-reflect');
function CPSWhitelistHandler(whitelist) {
this._whitelist = whitelist;
// We can't use "get" and "has" from the prototype of the handler with
// at least the nodejs implementations that is available. I don't
// know if this is going to change ...
// It looks like the internal check is done with Object.hasOwnProperty
this.get = function(target, name, receiver) {
@graphicore
graphicore / memoize
Last active August 29, 2015 14:08
draft of a generic caching interface
function Constructor(){}
var _p = Constructor.prototype;
p._rawMethod = function(name){}
_p.cachedMethod = memoize(p._rawMethod);
//memoize module
var _CACHE = new WeakMap();
@graphicore
graphicore / dumped.fea
Last active April 7, 2023 03:46
Sample output of $ ft2feaCLI.py fontfile.otf > dumped.fea
languagesystem DFLT dflt;
languagesystem arab dflt;
languagesystem arab ARA;
languagesystem arab URD;
#### Table GDEF ####
# GDEF Mark Attachment Classes:
@MarkAttachClass_2 = [ uniFBBC uniFBBB uniFBBF uniFBBE uni08E9 uni0664.below TahSmallTwoDotsbelowar uniFBB3 uniFBB7 uniFBB5 uniFBB9 uni065E uni065F uni065C uniFBC1 uni064D uni0655 uni0656 uni0650 uni0655064D uni06E6 uni06E3 uni06ED uni08F6 uni08F2 uni0662.below dots.horz.belowar uni06550650 vbelowar ];
@graphicore
graphicore / ftxvalidator
Last active December 5, 2016 12:20
ftxvalidator drop in replacement: Execute the Mac OS tool `ftxvalidator` on a remote host.
#! /bin/bash
# Copyright 2016 Lasse Fister <commander@graphicore.de>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@graphicore
graphicore / FontLister.js
Last active December 15, 2016 14:44
Proposal for a fontLister widget, based on https://github.com/graphicore/specimenTools/issues/7 ff.
define([
'specimenTools/_BaseWidget'
], function(
Parent
) {
"use strict";
/**
* Very basic <select> interface to switch between all loaded fonts.
* See FamilyChooser for a more advanced interface.
# This are the commands used to update https://github.com/graphicore/googleFontsTools
# This file is stored externally, so we can run the commands like this without having to
# care for new commits from us in the forked repository.
# git remote add upstream git@github.com:google/fonts.git
git fetch -f upstream master
git checkout -b fonts upstream/master
git filter-branch -f --subdirectory-filter tools --prune-empty -- --all
git checkout master
git rebase fonts
@graphicore
graphicore / languageCoverage.txt
Created February 2, 2017 21:43
Additional info for an issue on google/fonts
googleFontsTools/encodings/oriya_unique-glyphs.nam
lax language detection: true
language: Malayalam 1 % having: 1 needed: 95 missing: 94 ("ഃ" U+0d03,"അ" U+0d05,"ആ" U+0d06,"ഇ" U+0d07,"ഈ" U+0d08,"ഉ" U+0d09,"ഊ" U+0d0a,"ഋ" U+0d0b,"ൠ" U+0d60,"ഌ" U+0d0c … and 84 more) laxSkipped: 0
======================
googleFontsTools/encodings/gurmukhi_unique-glyphs.nam
lax language detection: true
language: Punjabi 71 % having: 68 needed: 96 missing: 28 ("\" U+005c,"u" U+0075,"0" U+0030,"A" U+0041,"3" U+0033,"C" U+0043,"U" U+0055,"-" U+002d,"–" U+2013,"—" U+2014 … and 18 more) laxSkipped: 3
language: Malayalam 1 % having: 1 needed: 95 missing: 94 ("ഃ" U+0d03,"അ" U+0d05,"ആ" U+0d06,"ഇ" U+0d07,"ഈ" U+0d08,"ഉ" U+0d09,"ഊ" U+0d0a,"ഋ" U+0d0b,"ൠ" U+0d60,"ഌ" U+0d0c … and 84 more) laxSkipped: 0
======================
googleFontsTools/encodings/kannada_unique-glyphs.nam
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Glyph Table</title>
<script src="../../../lib/bower_components/requirejs/require.js"></script>
<script>
fontFiles = [
'../../assets/fonts/Jura-Medium.ttf'
, '../../assets/fonts/MontserratAlternates-Bold.ttf'
// jshint esversion:6
const NodeGit = require('nodegit')
, path = require('path')
, MAX_PARALLEL_JOBS = 8
, REPOSITORY_BASE_PATH = '/tmp/node_git_bug_1495'
;
/**
* Expecting typical github urls here, like: "https://github.com/username/projectname"
* returns REPOSITORY_BASE_PATH + "/username_projectname"