Skip to content

Instantly share code, notes, and snippets.

View matt-curtis's full-sized avatar

Matt Curtis matt-curtis

View GitHub Profile
let sketch = require('sketch')
let settingsAttribute = getSettingsAttributeForKey_Value(kLowerCaseType, kLowerCaseSmallCapsSelector)
applySubstringFontModification()
//getFontAttributesForSelectedRange()
function applySubstringFontModification() {
let document = sketch.getSelectedDocument()
let textLayer = document.selectedLayers.layers[0]
@matt-curtis
matt-curtis / FontSpike.js
Last active December 18, 2018 16:37 — forked from KevinGutowski/FontSpike.js
Testing to see if I can build an Opentype Panel
framework("CoreText");
const document = require("sketch").getSelectedDocument();
const textLayer = document.selectedLayers.layers[0];
// WORKS (System font has native support for small caps):
const font = NSFont.systemFontOfSize_weight(28, NSFontWeightBold);