Raster Graphics TextMeasure for SVG
Les mainteneurs répondent en général sous 1 jour
@Danielku15 y travaille déjà.
Depuis le 4/12/2025.
Évaluation
Cette issue n'a pas encore été évaluée.
Description
The SVG rendering currently uses a rather hacky text measurement engine where we pre-compute certain character sizes and then sum them up. for bold and italic we just add a factor.
This is error prone and often imprecise.
To eliminate this problem we should implement a new text-renderer for all platforms.
C#/Kotlin
For C# and Kotlin it's fairly easy: We simply use alphaSkia. Any potential custom-fonts should be registered there already.
JS Node
Same as for C#/Kotlin we can rely on alphaSkia.
JS Browser
Here it gets tricky. In Web Workers we do not have access to the web fonts loaded so we need to find something different:
- The general idea is to use a OffScreenCanvas and load all fonts into the worker context using the font loading APIs.
- To pass the web fonts to the worker context we do the following:
- We allow users to explicitly specify the font sources. If users specify the location we can pass the metadata to the worker and load the fonts there. The config would be similar to how we have it for the SMuFl Fonts. For one font, we might have multiple sources.
- We should align the options to the properties available for
FontFacedefinitions (family, style, weight, src, unicode-range). As this feature is web-only we can use the web type definitions directly.
- We should align the options to the properties available for
- If no font source is specified, we try to auto-detect it. Unfortunately
FontFacedoes not give us access to the original source.Array.from(document.styleSheets).flatMap(y => Array.from(y.rules).filter(z => z instanceof CSSFontFaceRule))gives us access to all custom web font definitions.- For every font needed in the rendering, we lookup the matching CSS font rules (matching can be rather loose, better have more fonts than less).
- We fill the remaining font definitions.
- We allow users to explicitly specify the font sources. If users specify the location we can pass the metadata to the worker and load the fonts there. The config would be similar to how we have it for the SMuFl Fonts. For one font, we might have multiple sources.
- Langage dominant
- TypeScript
- Étoiles
- 1.9k
- Forks
- 297
- Merge moyen
- 9 h 2 min
- PR mergées (30 j)
- 44
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de CoderLine/alphaTab
-
ai-authored
Difficulté 2/5 1-3 heures Accessibilité débutants 69/100
Les mainteneurs répondent en général sous 1 jour
-
ai-authored
Difficulté 3/5 1-2 jours Accessibilité débutants 66/100
Les mainteneurs répondent en général sous 1 jour
-
Respect systems layout of MusicXMLPeut-être pris @Danielku15 l’a pris il y a 18 jours. Ouverte
CoderLine/alphaTab#2909 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Expose Lyrics in public apiPeut-être pris @Danielku15 l’a pris il y a 18 jours. Ouverte
CoderLine/alphaTab#2908 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Show accentuations on tab-only stavesPeut-être pris @Danielku15 l’a pris il y a 18 jours. Ouverte
CoderLine/alphaTab#2906 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de CoderLine/alphaTab
Issues similaires
-
[Feature]: 建议导入源后,自动切换到新导入的源Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
lyswhut/lx-music-desktop#3026 ·
-
area: ci type: test
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
schlessera/brain-kit#2769 ·
Les mainteneurs répondent en général sous 1 jour
-
Read a vector index's quantization back on Neo4j 2026.10, which reports vector.quantization.typeOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
liberation-data/drivine#231 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
alveusgg/alveusgg#2502 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour