Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing then blurring again …

Lasse Fister graphicore

🎯
Focusing then blurring again …
Block or report user

Report or block graphicore

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@graphicore
graphicore / ttfont-decompile.py
Created Feb 20, 2019
Used to plot memory usage with `mprof` (python memory-profiler)
View ttfont-decompile.py
#!/usr/bin/env python
from fontTools.ttLib import TTFont
# using sleep to
from time import sleep
import sys
if __name__ == '__main__':
fonts = [font for font in sys.argv if font.endswith('tf')]
ttfonts = []
View nodegit_bug_1495.js
// 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"
View index.html
<!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'
@graphicore
graphicore / languageCoverage.txt
Created Feb 2, 2017
Additional info for an issue on google/fonts
View languageCoverage.txt
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
View update-graphicore-googleFontsTools
# 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
View FontLister.js
define([
'specimenTools/_BaseWidget'
], function(
Parent
) {
"use strict";
/**
* Very basic <select> interface to switch between all loaded fonts.
* See FamilyChooser for a more advanced interface.
@graphicore
graphicore / ftxvalidator
Last active Dec 5, 2016
ftxvalidator drop in replacement: Execute the Mac OS tool `ftxvalidator` on a remote host.
View ftxvalidator
#! /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 / dumped.fea
Last active Jan 22, 2016
Sample output of $ ft2feaCLI.py fontfile.otf > dumped.fea
View 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 / memoize
Last active Aug 29, 2015
draft of a generic caching interface
View memoize
function Constructor(){}
var _p = Constructor.prototype;
p._rawMethod = function(name){}
_p.cachedMethod = memoize(p._rawMethod);
//memoize module
var _CACHE = new WeakMap();
@graphicore
graphicore / proxy-whitelist.js
Last active Aug 29, 2015
direct proxies as whitelists
View proxy-whitelist.js
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) {
You can’t perform that action at this time.