Skip to content

Instantly share code, notes, and snippets.

@weiweihuanghuang
weiweihuanghuang / split_keyboards.md
Created November 9, 2022 22:40 — forked from itod/split_keyboards.md
Every "split" mechanical keyboard currently being sold that I know of
@weiweihuanghuang
weiweihuanghuang / family.designspace
Created January 13, 2020 10:50
family.designspace issue
<?xml version='1.0' encoding='utf-8'?>
<designspace format="4.0">
<axes>
<axis default="100" maximum="900" minimum="100" name="weight" tag="wght">
<labelname xml:lang="en">Weight</labelname>
<map input="100" output="0" />
<map input="200" output="140" />
<map input="300" output="280" />
<map input="400" output="420" />
<map input="500" output="560" />
body,
input,
textarea,
select
{
font-family: -apple-system, BlinkMacSystemFont !important;
}
.TO .nU > .n0,
.TO.NQ .nU > .n0,
@weiweihuanghuang
weiweihuanghuang / Skew only Paths and Anchors.py
Last active September 2, 2018 02:59
Skew only Paths and Anchors
#MenuTitle: Skew only Paths and Anchors
# -*- coding: utf-8 -*-
__doc__="""
"""
import GlyphsApp
import math
Font = Glyphs.font
Doc = Glyphs.currentDocument
@weiweihuanghuang
weiweihuanghuang / Select Same Glyph and Layer Color.py
Created November 24, 2017 14:39
Select Same Glyph and Layer Color
#MenuTitle: Select Same Glyph and Layer Color
# -*- coding: utf-8 -*-
__doc__="""
In Font view, select glyphs with the same color(s) and layer color as the currently selected one(s).
"""
import GlyphsApp
def indexSetWithIndex( index ):
indexSet = NSIndexSet.alloc().initWithIndex_( index )
#MenuTitle: Center Glyphs Mine
# -*- coding: utf-8 -*-
__doc__="""
"""
import GlyphsApp
thisFont = Glyphs.font # frontmost font
listOfSelectedLayers = thisFont.selectedLayers # active layers of selected glyphs
import GlyphsApp
yDiff = 10
Font = Glyphs.font
Doc = Glyphs.currentDocument
selectedLayers = Font.selectedLayers
selectedLayers = [ l for l in selectedLayers if hasattr(l.parent, 'name')]
#MenuTitle: Get All Components
# -*- coding: utf-8 -*-
"""Returns the selected text with all components available in each glyph"""
from AppKit import NSRange
Font = Glyphs.font
Doc = Glyphs.currentDocument
# Replace selected text
@weiweihuanghuang
weiweihuanghuang / Active Default Features.py
Created May 1, 2016 20:41
Activate Default Features
#MenuTitle: Activate Default Features
# -*- coding: utf-8 -*-
__doc__="""
Activate these default features
"""
import GlyphsApp
Font = Glyphs.font
editTab = Font.currentTab