This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Font Subset</title> | |
<script src="https://cdn.jsdelivr.net/npm/opentype.js@latest/dist/opentype.min.js"></script> | |
</head> | |
<body> | |
<div> | |
<p><label for="text">Choose a font file:</label></p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let layer = figma.currentPage.selection[0]; | |
let vectorPaths = layer.vectorPaths.map(item => { | |
return {windingRule: 'NONZERO', data: item.data} | |
}) | |
layer.vectorPaths = vectorPaths | |
layer.exportAsync({ | |
format: 'SVG' | |
}).then(uint8Array => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"fonts": ["./src/NotoSerifSC-Bold.otf"], | |
"texts": " 0123456789:年月日时分秒公元农历腊零初一二三四五六七八九十廿甲乙丙丁戊己庚辛壬癸子丑寅卯辰巳午未申酉戌亥立春雨水惊蛰春分清明谷雨立夏小满芒种夏至小暑大暑立秋处暑白露秋分寒露霜降立冬小雪大雪冬至小寒大寒" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"commit" : "de199738bddcc38c4a5af7eee0589554d43d0bde", | |
"pagesAndArtboards" : { | |
"1E94526E-CDAC-42A5-8321-0601A47E57B9" : { | |
"name" : "xxx", | |
"artboards" : { | |
"C31F4E02-07EC-4CC5-91D0-C5E9C7222763" : { | |
"name" : "xxx" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# The MIT License | |
# | |
# Copyright 2017 Ashung.hung@gmail.com | |
# | |
# Permission is hereby granted, free of charge, to any person | |
# obtaining a copy of this software and associated documentation | |
# files (the "Software"), to deal in the Software without | |
# restriction, including without limitation the rights to use, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sketchtool=/Applications/Sketch.app/Contents/Resources/sketchtool/bin/sketchtool | |
for f in "$@" | |
do | |
# Sketch file | |
if [ -f "${f}" -a ${f##*.} = "sketch" ] | |
then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sketchtool=/Applications/Sketch.app/Contents/Resources/sketchtool/bin/sketchtool | |
#echo $(python --version) | |
function extractSketchFile () { | |
sketchFile=$1 | |
folder=${sketchFile%.sketch} |