#!/bin/sh # mkicons.sh - build the weather icon subset font for the KWGT clock # Copyright (C) 2026 Danilo M. # # 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 # # 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