feat(logo): add --outline-text for font-independent wordmarks - #21
Merged
Conversation
Both logo generators embed MartianMono-Regular.ttf as base64 @font-face (~64 KB, ~98% of each SVG) so the wordmark can stay real <text>. Add an opt-in --outline-text mode that converts only the used glyphs to <path> outlines via a shared logolib.text_to_path_d() helper (fontTools SVGPathPen + TransformPen, baking a y-flipped per-glyph affine). The result carries no font and no <text>, dropping each file to ~13-16 KB. For srcmorph the feGaussianBlur morph is preserved by moving the filters from the <text> onto the outlined groups. Default text mode is unchanged (byte-identical output) and fontTools is imported lazily, so it is only required when --outline-text is used. Also commit the two generated outlined SVGs and document the mode and its tradeoffs (not selectable/editable, but smaller, font-independent, and robust in renderers that strip <style>/@font-face) in the logo README. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PevG84XGs6qyD1U35LUmpg
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--outline-textmode to both logo generators that emits the wordmark as<path>outlines instead of<text>+ a base64-embedded font.MartianMono-Regular.ttfis ~64 KB — about 98% of each generated SVG. Outlining converts only the glyphs actually used, dropping each file to ~13–16 KB with no font and no<text>at all.logolib.text_to_path_d()(fontToolsSVGPathPen+TransformPen, y-flipped per-glyph affine; advances fromhmtxso glyphs land on the exact same x-positions as the<text>layout). fontTools is imported lazily, so it's only required when--outline-textis used.feGaussianBlur"morph" is preserved by moving the filters from the<text>onto the outlined groups (filters apply to any element).java-llama-cpp-outlined.svg,srcmorph-outlined.svg) and document the mode + tradeoffs in the logo README.Default text mode is unchanged — regenerated output is byte-identical to the committed
*-generated.svg.Why
The embedded-font wordmark is already portable, but the outlined variant is ~5× smaller, carries no font binary, and survives renderers that strip
<style>/@font-face. It trades away selectable/editable text, so it's opt-in and text stays the default.Test plan
m🤖 Generated with Claude Code
https://claude.ai/code/session_01PevG84XGs6qyD1U35LUmpg