Repository navigation
script: Do not load all fonts for SVG font database - #46476
Conversation
60380f8 to
c1fa8f0
Compare
|
@Narfinger Is this ready for review? |
|
No there are some problems with the current design. |
|
So update after I worked a bit on it. I think I am doing something wrong with the way I matching the font families in svg_font. This website ( https://upload.wikimedia.org/wikipedia/commons/e/ea/SVG_Text_Font_Test.svg) currently looks like this: |
6611382 to
38caf0f
Compare
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
38caf0f to
6f1e940
Compare
|
Ok this works now. To get feedback I am going to mark it ready for review. I am wondering if there is a better way to not put the svg_resolver into script crate but I couldn't figure it out at the moment. |
Co-authored-by: Josh Matthews <josh@joshmatthews.net> Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net> Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Currently the SVG font database loads all system fonts at the start and also inserts any fonts it loads. This removes both of these. Additionally, we add a small cache that handles the returned fontdb::IDs if they are already entered. This will also improve the startup time of constellation (and hence everything depending on it) as we do not need to wait for all fonts to be loaded. Testing: WPT test run https://github.com/Narfinger/servo/actions/runs/30888001779 --------- Signed-off-by: Narfinger <Narfinger@users.noreply.github.com> Co-authored-by: Josh Matthews <josh@joshmatthews.net>

Currently the SVG font database loads all system fonts at the start and also inserts any fonts it loads.
This removes both of these.
Additionally, we add a small cache that handles the returned fontdb::IDs if they are already entered.
This will also improve the startup time of constellation (and hence everything depending on it) as we do not need to wait for all fonts to be loaded.
Testing: WPT test run https://github.com/Narfinger/servo/actions/runs/30888001779