openframeworks / openframeworks/openFrameworks
ofTrueTypeFont feature discussion
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
This is a feature discussion issue for what should be added / changed to ofTTF.
Would be great to get some eyes on this from @vtron @ofzach @arturoc and anyone with thoughts on the matter.
TextAreas:
- Fit text to a box
- Handle overflow ( ie either truncate or resize box height )
- non ragged options
- could textAreas work with both ofTTF and ofDrawBitmapString ? abstract text formatting?
Alignment:
- Left align a string
- Right align
- Center
- Top align
- Base align
Spacing:
- Kerning
- Leading / line height
Loading:
- Allow for loading a font up to a max size for drawing at different sizes.
- Allow for selection and loading of specific sizes within one object. ie: myFont.setCurrentSize(12);
- Font family's / sets ? Bold, Italic etc?
Drawing:
- Allow for drawing font at different sizes. Scale font as needed.
Formatting:
- Could we somehow allow a string to have different colors, sizes. Right now it is a pain to change colors or sizes.
- would this be replicating basic html or another approach? maybe better as an addon?
Info:
- Ability to get the x and y position of the nth character in the string? useful maybe for cursor or selection?
Update:
-Underline
-Render rect behind text ( a la what @kylemcdonald added to ofDrawBitmapString)
-Scale type to fit a rect + keep aspect ratio
-Crazy: text along a path :)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the ofTTF and ofDrawBitmapString entry points mentioned in the issue, then compare the requested text areas, alignment, spacing, loading, drawing, formatting, and character-position capabilities. The scope is currently a broad feature discussion with no selected design or defined completion criteria; a focused proposal would be needed before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100