Skip to content

Comments

(New Node) - Dynamically determine font size based on area.#62

Open
nomcycle wants to merge 4 commits intocubiq:mainfrom
nomcycle:fittext
Open

(New Node) - Dynamically determine font size based on area.#62
nomcycle wants to merge 4 commits intocubiq:mainfrom
nomcycle:fittext

Conversation

@nomcycle
Copy link

Pretty simple, doesn't introduce any additional dependencies, simply calculates the delta area that text takes up given a font, then uses that delta to determine the font size necessary to fit inside a target area.

Wide:
image

Tall:
image

Single Line:
image

Short:
image

@cubiq
Copy link
Owner

cubiq commented Jul 30, 2024

cool! thanks. this gives me some ideas, maybe it can be more easily integrated

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.

2 participants