BitmapText.js - Demos & Examples

Pixel-perfect bitmap text rendering for HTML5 Canvas

Production Bundle Demos 32KB

These demos use the minified runtime bundle (single 32KB file) for optimal production performance.

Hello World Demo (Bundled)
Minimal example showing basic usage with production bundle
Multi-Size Demo (Bundled)
Shows text rendering at multiple font sizes (18, 18.5, 19) with production bundle
Baseline & Alignment Demo (Bundled)
Comprehensive interactive comparison of all baseline × alignment combinations with production bundle
Font Render Tests (Bundled)
Full test suite and visual verification with production bundle
Small Text Rendering Demo (Bundled)
Demonstrates interpolated metrics for font sizes < 9px with production bundle

Development Demos 17 files

These demos load individual source files (17 separate files) for easier debugging and development.

Hello World Demo
Minimal example showing basic usage with individual source files
Multi-Size Demo
Shows text rendering at multiple font sizes with individual source files
Transform Behavior Demo
Shows how BitmapText ignores context transforms (translate, scale, rotate)
Baseline & Alignment Demo
Comprehensive interactive comparison of all baseline × alignment combinations (36 demos: 6 baselines × 3 alignments × 2 implementations)
Font Render Tests
Full test suite and visual verification with individual source files
Small Text Rendering Demo
Demonstrates interpolated metrics for font sizes < 9px with individual source files

Performance Benchmarks

Comprehensive performance testing comparing BitmapText.js vs HTML5 Canvas with progressive FPS testing and detailed reports.

Rendering Performance Benchmark (Unbundled)
Progressive FPS testing with 17 individual source files - measures peak rendering capacity at 60fps
Rendering Performance Benchmark (Bundled)
Progressive FPS testing with production bundle - compares bundled vs unbundled performance
Measurement Performance Benchmark (Unbundled)
measureText() performance testing with 17 individual source files - text length scaling, kerning overhead, and Canvas comparison
Measurement Performance Benchmark (Bundled)
measureText() performance testing with production bundle - validates O(n) scaling and kerning costs

Build & Test Tools

Font Assets Builder
Generate bitmap font assets from system fonts - exports metrics + atlas images
Very Small Font Size Demo
Test HTML5 Canvas fillText() behavior at very small font sizes (0.5-5px) with crisp rendering and bounding box visualization
Status Reporting Tests
Test all status reporting scenarios and error handling
Text Metrics Visualizer
Visualize text measurements, baselines, and font metrics