Feat/pixel font headings - #13
Open
VectorJet wants to merge 3 commits into
Open
Conversation
- 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
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.
Add Diffrent Heading styles