https://github.com/tlsa/libparagraph
Text layout library
https://github.com/tlsa/libparagraph
Last synced: about 1 year ago
JSON representation
Text layout library
- Host: GitHub
- URL: https://github.com/tlsa/libparagraph
- Owner: tlsa
- Created: 2019-08-12T15:28:58.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2022-03-22T19:04:40.000Z (over 4 years ago)
- Last Synced: 2025-06-23T05:05:55.888Z (about 1 year ago)
- Language: C
- Size: 71.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
LibParagraph
============
Library for performing text layout.
TODO
----
### Content management
#### Notes
* Add way to remove content from a paragraph.
- How to identify which content to remove? Client handle? Would need
to loop through entire paragraph's content entries to find a match
for the handle.
- Otherwise change the API to return an opaque handle for the paragraph
content entry to the client, in each of the content_add functions.
- How to handle removing an inline start or inline end?
- Maybe removing the start removes all content up to and including matching
end?
- Maybe removing an end is an error.
* Add way to modify a content style.
- Again; it will help for the client to have a handle for the paragraph
content entry, so it can say what it's changing the style of.
#### Actions
* Add remove content API.
### Ownership
#### Notes
* Client string: Do we need a way to ref/unref? Or is assuming a client keeps
it around while we might use it safe?
* Client styles: Do we need a way to ref/unref? Or is assuming a client keeps
it around while we might use it safe?
### Styles
#### Notes
* Need a way to get values from the opaque client style.
- Probably match callback functions to libcss computed style API.
* How to handle multiple styles per content element?
- E.g. hover visited, etc?
- Let the client handle it all by changing style on the content entry?
- Who is responsible for splitting for stuff like first-letter, first-word,
etc? Us or client?
### Text
#### Notes
* Going to need to split text into runs efficiently, for at least:
- Bidirectional algorithm.
- Styles (first-letter, first-word, etc)
- Line break
- Full justification?