[Feature]: Embed fonts in the SVG export to preserve fidelity
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
Direzione di ricerca
Start by tracing the SVG export path and how it emits <text> elements and the font references; the issue does not name source files or tests. Compare the proposed font embedding, path conversion, and UI documentation options against the client-side and selectable-text constraints. Done means the chosen approach preserves SVG fidelity on machines without the bundled font, or clearly documents the limitation in the UI and README.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
The exported SVG references fonts by name only. Token positions are also hardcoded per <text> element using an approximate character width (font_size * 0.602). On any machine without the exact bundled font installed, the text renders with a fallback font at different advances, so tokens drift, overlap, or leave gaps. The SVG export therefore cannot guarantee visual fidelity outside the app, while the PNG export can.
Proposed solution
Pick one of:
- Embed the used font subset as base64
@font-faceinside the<defs>of the exported SVG. Self-contained files, larger output (the woff2 files are small, and only one family is used per export). - Convert text runs to outline paths at export time (
<path>instead of<text>). Perfect fidelity everywhere, no font dependency, larger files, and text stops being selectable and searchable. - If neither is acceptable, surface the limitation in the UI next to the SVG button and document it in the README.
Option 1 is the smallest behavioral change and keeps text selectable.
Alternatives considered
Do nothing and document the limitation. This keeps the current file sizes but leaves the fidelity gap between PNG and SVG.
Project constraints
- This keeps everything client-side (no backend, no server-side processing; code never leaves the browser).
- This does not introduce a DOM-screenshot library (html2canvas, dom-to-image); rendering stays on Canvas2D/SVG.
- This respects resolution honesty: the export canvas is drawn at true scale and never upscaled after the fact.
- Lingua principale
- Rust
- Stelle
- 1
- Fork
- 0
- Merge medio
- 1g 7h
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di suradet-ps/codeframe
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
suradet-ps/codeframe#40 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
suradet-ps/codeframe#35 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
suradet-ps/codeframe#36 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Target width input clamps the value on every keystrokeForse già presa @AnushreeKasturi l’ha presa 2 giorni fa. Apertabug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
suradet-ps/codeframe#37 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
suradet-ps/codeframe#38 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di suradet-ps/codeframe
Issue simili
-
Alt select PhotocraftApertapriority: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
storytold/photocraft#8041 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
writerslogic/holographic-memory#96 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
engine-rs P3 review-deferral wasm
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
maniator/verticopolis#1154 ·
I maintainer di solito rispondono entro 1 giorno