Skip to content

Feat/pixel font headings - #13

Open
VectorJet wants to merge 3 commits into
mainfrom
feat/pixel-font-headings
Open

Feat/pixel font headings#13
VectorJet wants to merge 3 commits into
mainfrom
feat/pixel-font-headings

Conversation

@VectorJet

Copy link
Copy Markdown
Owner

Add Diffrent Heading styles

VectorJet added 3 commits July 9, 2026 05:30
- Add src/utils/font-raster.ts: opentype.js-based TTF rasterizer with
  scanline fill for bezier paths, half-block char output (▀▄█)
- Add src/nodes/heading.tsx: HeadingBlock component using rasterized rows
- Wire HeadingBlock into blocks.tsx replacing flat colored text
- Bundle JetBrainsMono-Bold.ttf in assets/fonts/
- H1=18px H2=14px H3=12px H4=10px H5=8px H6=7px pixel heights
- Render cache keyed by level+text so repeated headings are free
…ixel rasterizer with pure Unicode transliteration\n- H1/H2: serif_bld (\u{1D400}\u{1D401}\u{1D402}), H3/H4: sans_bld (\u{1D7D4}\u{1D7D5}\u{1D7D6}), H5/H6: sans (\u{1D5A0}\u{1D5A1}\u{1D5A2})\n- Reuses existing arts.ts alphabet data, zero new deps\n- Fully responsive: single-line text, scales with terminal width\n- Remove font-raster.ts, JetBrainsMono-Bold.ttf, opentype.js
- Add src/utils/unicode-heading.ts: pure char-map transform to Unicode
  Mathematical Alphanumeric Symbols block per heading level
  H1=sans-bold H2=bold-serif H3=bold-italic H4=sans-bold-italic
  H5=italic H6=monospace
- Add src/nodes/heading.tsx: HeadingBlock using transformChildren to
  apply unicode style to text nodes, passthrough for inline code/em etc
- Zero layout overhead, fully responsive, single-line output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant