From 5f4e05eaec6576d4b3f0796fdccfd5dc1405c58f Mon Sep 17 00:00:00 2001 From: Jamie Schembri Date: Wed, 14 Jan 2026 09:27:49 +0100 Subject: [PATCH] Use Open Sans font for OG images, fail gracefully --- README.md | 2 +- blurt | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 79fc808..c0da51a 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ site_author: "Your Name" ## OpenGraph Images -When ImageMagick is installed, blurt automatically generates OpenGraph images for social sharing. Images are created at: +When ImageMagick is installed, blurt automatically generates OpenGraph images for social sharing. Requires the [Open Sans](https://fonts.google.com/specimen/Open+Sans) font to be installed. Images are created at: - `dist/og.jpg` - for the index page - `dist//og.jpg` - for each post diff --git a/blurt b/blurt index dee3a28..571c137 100755 --- a/blurt +++ b/blurt @@ -1,7 +1,7 @@ #!/bin/sh set -e -VERSION="1.2.1" +VERSION="1.3.0" SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" DIST="$SCRIPT_DIR/dist" @@ -34,19 +34,19 @@ generate_og_image() { if [ -n "$description" ]; then magick -size 1200x630 gradient:'#ffffff-#c8c8c8' \ - \( -font "Helvetica-Bold" -pointsize 64 -fill '#111111' \ + \( -font "Open-Sans-Bold" -pointsize 64 -fill '#111111' \ -size 1000x -background none -gravity center caption:"$title" \) \ -gravity center -geometry +0-20 -composite \ - \( -font "Helvetica" -pointsize 22 -fill '#555555' \ + \( -font "Open-Sans-Regular" -pointsize 22 -fill '#555555' \ -size 900x -background none -gravity center caption:"$description" \) \ -gravity center -geometry +0+45 -composite \ - -quality 90 "$output" + -quality 90 "$output" || true else magick -size 1200x630 gradient:'#ffffff-#c8c8c8' \ - \( -font "Helvetica-Bold" -pointsize 72 -fill '#111111' \ + \( -font "Open-Sans-Bold" -pointsize 72 -fill '#111111' \ -size 1000x -background none -gravity center caption:"$title" \) \ -gravity center -composite \ - -quality 90 "$output" + -quality 90 "$output" || true fi } -- 2.51.2