Skip to content

Instantly share code, notes, and snippets.

@darrenwiens
darrenwiens / geo_ligatures.py
Last active November 19, 2024 14:09
Supplements a font with ligatures of country and US state shapes. E.g. type "stateCA" -> California shape, "countryCA" -> Canada shape.
import fontforge
import json
from shapely.geometry import shape, MultiPolygon
from shapely.affinity import translate
font = fontforge.open("Arial.ttf") # font to edit
font.fullname = "Geo Ligatures"
font.familyname = "Geo Ligatures"
font.fontname = "GEO_LIGATURES"
@darrenwiens
darrenwiens / index.html
Created April 29, 2025 16:31
Display a video derived from netcdf, all in browser
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Firesmoke Video Viewer</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<link href="https://api.mapbox.com/mapbox-gl-js/v3.11.0/mapbox-gl.css" rel="stylesheet">
<script src="https://api.mapbox.com/mapbox-gl-js/v3.11.0/mapbox-gl.js"></script>
<style>