Glyph Documentation
Glyph Documentation
Section titled “Glyph Documentation”Complete reference documentation for the Blocky Alphabet glyph system used in the opencode-warcraft-notifications project.
📚 Documentation Files
Section titled “📚 Documentation Files”Comprehensive markdown documentation showing:
- All 26 letters (A-Z) with ASCII grids and SVG previews
- All 6 symbols with ASCII grids and character codes
- Usage examples and API reference
- Grid system explanation
- Color zone definitions
Interactive HTML gallery featuring:
- Visual grid of all glyphs
- Hoverable glyph cards with preview
- Adjustable block size controls
- Color legend
- Responsive design optimized for viewing
🎨 Available Glyphs
Section titled “🎨 Available Glyphs”Letters (26)
Section titled “Letters (26)”A B C D E F G H I J K L M N O P Q R S T U V W X Y ZSymbols (6)
Section titled “Symbols (6)”| Symbol | Name | Width | Usage |
|---|---|---|---|
- | Hyphen | 3 cols | Compound words, ranges |
| | Pipe | 1 col | Separators, delimiters |
' | Apostrophe | 1 col | Contractions, possessives |
" | Quote | 2 cols | Quoted text |
? | Question | 4 cols | Interrogatives |
! | Exclamation | 1 col | Emphasis |
📐 Grid System
Section titled “📐 Grid System”All glyphs use a 7-row grid system:
Row 0: Top padding/ascender spaceRows 1-2: Upper portion (PRIMARY color)Rows 3-5: Middle to lower portion (SECONDARY color)Row 6: Bottom padding/descender spaceWidth Variations
Section titled “Width Variations”- Narrow (1-2 columns): I, J, apostrophe, pipe, exclamation
- Regular (3-4 columns): Most letters, hyphen, question
- Wide (5 columns): M, W, V, X
🎨 Color System
Section titled “🎨 Color System”Theme: Dark (Default)
Section titled “Theme: Dark (Default)”- PRIMARY:
#F1ECEC(off-white) - rows 0-2, 6 - SECONDARY:
#B7B1B1(light gray) - rows 3-5 - TERTIARY:
#4B4646(dark gray) - shading/depth
Theme: Light
Section titled “Theme: Light”- PRIMARY:
#2D2D2D(dark gray) - SECONDARY:
#4A4A4A(medium gray) - TERTIARY:
#B8B8B8(light gray)
💻 Quick Start
Section titled “💻 Quick Start”Basic Usage
Section titled “Basic Usage”import { blockyTextToSVG } from './utils/alphabet';
// Simple text to SVGconst svg = blockyTextToSVG('HELLO');With Options
Section titled “With Options”const svg = blockyTextToSVG('WARCRAFT', { theme: 'dark', // 'dark' | 'light' blockSize: 6, // Size of each pixel block charSpacing: 1, // Spacing between characters optimize: true, // Enable path optimization});Available Characters
Section titled “Available Characters”import { getAvailableCharacters, // Letters only getAvailableSymbols, // Symbols only getAllAvailableCharacters, // Both} from './utils/alphabet/types';
const letters = getAvailableCharacters();// Returns: ['A', 'B', 'C', ..., 'Z']
const symbols = getAvailableSymbols();// Returns: ['-', '|', "'", '"', '?', '!']
const all = getAllAvailableCharacters();// Returns: ['A', ..., 'Z', '-', '|', "'", '"', '?', '!']📖 Examples
Section titled “📖 Examples”Letters Only
Section titled “Letters Only”blockyTextToSVG('OPENCODE');Output: OPENCODE in blocky style
With Symbols
Section titled “With Symbols”blockyTextToSVG('HELLO WORLD!');Output: HELLO WORLD! with space and exclamation
Hyphenated Words
Section titled “Hyphenated Words”blockyTextToSVG('A-Z');Output: A-Z with hyphen separator
Questions
Section titled “Questions”blockyTextToSVG('READY?');Output: READY? with question mark
🔍 Viewing Options
Section titled “🔍 Viewing Options”1. Markdown Reference
Section titled “1. Markdown Reference”Open COMPLETE-REFERENCE.md in any markdown viewer to see:
- ASCII grids for each glyph
- Inline SVG previews
- Technical specifications
- Code examples
2. Interactive HTML Gallery
Section titled “2. Interactive HTML Gallery”Open index.html in a web browser to:
- Browse glyphs visually
- Adjust block size in real-time
- See hover effects
- View color legend
- Copy usage examples
3. Original Documentation
Section titled “3. Original Documentation”For more detailed technical information:
🛠️ Development
Section titled “🛠️ Development”Generate Documentation
Section titled “Generate Documentation”To regenerate the glyph documentation:
cd pagesbun run generate-glyph-docs.mjsThis will create/update:
docs/glyphs/COMPLETE-REFERENCE.md- Markdown referencedocs/glyphs/index.html- Interactive gallery
Generate Sample SVGs
Section titled “Generate Sample SVGs”To generate sample SVG files:
cd pagesbun run generate-samples.mjsSamples are saved to pages/samples/:
opencode.svg- “OPENCODE”warcraft.svg- “WARCRAFT”hello-world.svg- “HELLO WORLD”a-z-test-.svg- Alphabet demoquick-fix-.svg- Punctuation demo
📊 Technical Details
Section titled “📊 Technical Details”Character Dimensions
Section titled “Character Dimensions”| Metric | Value |
|---|---|
| Grid rows | 7 (fixed) |
| Grid columns | 1-5 (variable) |
| Default block size | 6px |
| Default char spacing | 1 block |
| Primary color zone | Rows 0-2, 6 |
| Secondary color zone | Rows 3-5 |
SVG Output Specifications
Section titled “SVG Output Specifications”- Format: Optimized SVG paths
- Viewport: Dynamic based on text length
- Colors: Hex color values
- Optimization: Optional path merging
- Attributes:
fill="none", explicit xmlns
Performance
Section titled “Performance”- Small footprint: ~100 bytes per character
- Efficient rendering: Uses SVG paths, not individual rectangles
- Caching friendly: Deterministic output for same input
- Build-time generation: Pre-render for production
🎯 Use Cases
Section titled “🎯 Use Cases”- Logo Generation: Create custom blocky logos
- Headers: Stylized section headers
- Badges: Pixelated badges and labels
- Branding: Consistent retro aesthetic
- Notifications: Match Warcraft II notification style
- Documentation: Visual examples in docs
🔗 Related Resources
Section titled “🔗 Related Resources”Internal
Section titled “Internal”- Main README - Project overview
- Sound Descriptions - Warcraft II sounds
- Notification Plugin - Toast notifications
External
Section titled “External”- SVG Specification
- Warcraft II - Inspiration source
- Pixel Art - Art style reference
📝 Notes
Section titled “📝 Notes”- Case Sensitive: Only uppercase letters (A-Z) are available
- Limited Symbols: Only 6 punctuation marks are supported
- No Numbers: Numeric digits are not yet implemented
- Space Handling: Spaces are rendered as empty gaps (not shown in current version)
- Color Customization: Themes can be customized via options
🚀 Future Enhancements
Section titled “🚀 Future Enhancements”Potential improvements to the glyph system:
- Add numeric digits (0-9)
- Add more symbols (
.,,,:,;) - Support lowercase letters (a-z)
- Add ligatures for common pairs
- Implement space character rendering
- Add animation options
- Create font file format export
- Add glyph editor tool
📄 License
Section titled “📄 License”This glyph system is part of the opencode-warcraft-notifications project. See the main LICENSE file for details.
Last Updated: November 17, 2025
Version: 1.0.0
Glyphs: 26 letters + 6 symbols = 32 total