aboutsummaryrefslogtreecommitdiffstats
path: root/clock/mkicons.sh
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-12-02 15:38:48 +0100
committerDanilo M. <danix@danix.xyz>2026-12-02 15:38:53 +0100
commit316be05d1fe19e6d99d59eabb6a2170921fbc6c9 (patch)
tree0cb955a96a87999755736d2606a7df3c7ca35e31 /clock/mkicons.sh
downloadphone-customization-316be05d1fe19e6d99d59eabb6a2170921fbc6c9.tar.gz
phone-customization-316be05d1fe19e6d99d59eabb6a2170921fbc6c9.zip
Initial commit: phone-customization, KWGT iOS-style clock
KWGT widget preset replacing Niagara's clock with a tall, narrow, glassy clock: Material You tint with a fading gradient and glass rim, date with weather icon and temperature, next calendar event with countdown. Includes the build scripts for the squeezed Oswald clock font and the weather icon subset font. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'clock/mkicons.sh')
-rwxr-xr-xclock/mkicons.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/clock/mkicons.sh b/clock/mkicons.sh
new file mode 100755
index 0000000..7825e80
--- /dev/null
+++ b/clock/mkicons.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+# mkicons.sh - build the weather icon subset font for the KWGT clock
+# Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+# Build the weather icon font: Material Symbols Rounded (Apache-2.0), outline
+# style at weight 400, cut down to the glyphs the preset's weather formula uses.
+# Needs fontTools (build-time only).
+#
+# usage: mkicons.sh <MaterialSymbolsRounded[FILL,GRAD,opsz,wght].ttf> <out.ttf>
+#
+# Codepoints: sunny clear_night partly_cloudy_day partly_cloudy_night cloud
+# foggy air rainy_light rainy thunderstorm weather_mix weather_snowy
+# weather_hail tornado.
+set -e
+tmp=$(mktemp)
+trap 'rm -f "$tmp"' EXIT
+fonttools varLib.instancer "$1" FILL=0 GRAD=0 opsz=24 wght=400 -o "$tmp"
+pyftsubset "$tmp" --output-file="$2" --layout-features='' --name-IDs='*' \
+ --unicodes=e81a,f159,f172,f174,f15c,e818,efd8,f61e,f176,ebdb,f60b,e2cd,f67f,e199