Loading text without fonts
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.1k
- Forks
- 348
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 3
Description
I'm trying to build a terminal renderer for simple SVG files consisting only of text. I'm interested in extracting the text from an SVG, and I'd like to know the properties like the fill color (which is why I'd like to use `usvg` rather than `roxmltree` directly), but I don't actually care about the font at all, and I don't need the layout or glyph position information.
Would it be possible to support *simple* text element extraction without having the fontdb? I'd love to *just* get the `TextChunk`/`TextSpan` information, and it'd be fine if all the information like `.dx()`, `.dy()`, positioned glyphs, decoration spans, etc were all unavailable. (I do want the explicit x/y positioning info from the SVG itself, and it'd be helpful to know *whether* the span is decorated.)
Contributor guide
No contributing guide indexed for this repository
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 tracing how usvg currently exposes text through TextChunk and TextSpan, and where fontdb is required compared with direct roxmltree parsing. Define the supported extraction data, including SVG x/y positions and decoration state, and verify that font-dependent fields such as dx, dy, and positioned glyphs remain unavailable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100