[Feature]: Embed fonts in the SVG export to preserve fidelity
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Rust
- Estrellas
- 1
- Forks
- 0
- Merge medio
- 1 d 7 h
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de suradet-ps/codeframe
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
suradet-ps/codeframe#40 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
suradet-ps/codeframe#35 ·
Los mantenedores suelen responder en 1 día
-
documentation good first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
suradet-ps/codeframe#36 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: Target width input clamps the value on every keystrokePosiblemente ocupada @AnushreeKasturi la tomó hace 3 días. Abiertobug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
suradet-ps/codeframe#37 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
suradet-ps/codeframe#38 ·
Los mantenedores suelen responder en 1 día
Todos los issues de suradet-ps/codeframe
Issues similares
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
metasequoiaime/msime#9113 ·
Los mantenedores suelen responder en 1 día
-
area:desktop priority:p2 type:chore
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
area: supply-chain
Dificultad 1/5 Menos de una hora Aptitud para principiantes 73/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
-
Refresh stale docsAbierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 67/100
OpenCarControls/firmware#35 ·