ethanbrooks5827 / textinimage-canvas
Client-side HTML5 Canvas typography math: 4K offscreen scaling, curved circle-text arc geometry, speech-bubble layout, and DSEG7 date stamp formatting.
Package info
github.com/ethanbrooks5827/textinimage-canvas
Language:Go
pkg:composer/ethanbrooks5827/textinimage-canvas
v0.1.0
2026-12-03 01:53 UTC
Requires
- php: >=8.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Client-side HTML5 Canvas typography math: 4K offscreen scaling, curved circle-text arc geometry, speech-bubble layout, and DSEG7 date stamp formatting.
Built as a lightweight, zero-dependency reference toolkit for Text in Image.
Supported Presets
| Preset ID | Ratio / Scale | Guidance |
|---|---|---|
caption-top-strip |
4:5 |
add white header strip above photo with centered bold sans-serif caption |
speech-bubble |
1:1 |
rounded comic dialogue bubble with dynamic tail anchor toward subject |
dseg7-datestamp |
3:2 |
retro 90s digital camera orange 7-segment date stamp in bottom-right safe zone |
circle-badge |
1:1 |
polar arc glyph placement around outer radius with balanced kerning |
quote-overlay |
4:5 |
high-contrast quote typography with round-join outline and soft drop shadow |
Quick Usage
JavaScript / TypeScript (NPM & JSR)
import { listPresets, getPreset, buildWorkflowUrl } from 'textinimage-canvas'; console.log(listPresets().map((p) => p.id)); console.log(getPreset('caption-top-strip')); console.log(buildWorkflowUrl());
Python (PyPI)
from textinimage_canvas import list_presets, get_preset, build_workflow_url print([p["id"] for p in list_presets()]) print(get_preset("caption-top-strip")) print(build_workflow_url())
Go (pkg.go.dev)
package main import ( "fmt" pkg "github.com/ethanbrooks5827/textinimage-canvas" ) func main() { fmt.Println(pkg.HomepageURL) fmt.Println(len(pkg.ListPresets())) }
Rust (crates.io)
use textinimage_canvas::{HOMEPAGE_URL, list_presets, get_preset}; fn main() { println!("{}", HOMEPAGE_URL); assert!(get_preset("caption-top-strip").is_some()); assert!(!list_presets().is_empty()); }
Reference Pages
- Text in Image
- Add Caption to Photo
- Speech Bubble Generator
- Add Date Stamp to Photo
- Circle Text Generator
- AI Text Effects
- About
- Pricing
License
MIT