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')]
@weiweihuanghuang
weiweihuanghuang / setPreviewPanel.py
Last active March 12, 2017 21:49
Set Preview Panel Height Across Every Tab
#MenuTitle: Set Preview Panel
# -*- coding: utf-8 -*-
__doc__="""
Set preview panel height across every tab to the same as this tab
"""
import GlyphsApp
Font = Glyphs.font
frameHeight = Font.currentTab.previewView().frame().size.height
@weiweihuanghuang
weiweihuanghuang / Compare Fonts.py
Last active July 27, 2016 06:27
Compare Two Open Fonts – (Should only have two files open have them open to the same master, a new tab will open with all the changed glyphs)
#MenuTitle: Compare Fonts
# -*- coding: utf-8 -*-
__doc__="""
- Compare 2 open files and opens a new tab (in the current font) for each master showing the glyphs that are different between the 2 files.
- A decomposed copy of each different glyph from the other file will also be pasted in the background of each glyph in the current file.
*** WARNING *** This will clear the background in the current font. Uncomment the "doNotCopyToBackground" line to disable it.
"""