#8462·egui

Serif text in SVG images is displayed in greek alphabet

Author: dolezvo1Created Aug 27, 2026Updated Sep 27, 2026
Labelsbug

Describe the bug

I've noticed that serif text (which appears to be the default) in SVGs appears to be displayed in the greek alphabet. I noticed this on 0.35, but it happens on 0.36 as well.

To Reproduce Steps to reproduce the behavior:

  1. svg
     <svg viewBox="0 0 240 80" xmlns="http://www.w3.org/2000/svg">
       <style>
         .small {
           font: italic 13px sans-serif;
         }
         .heavy {
           font: bold 30px serif;
         }
         .Rrrrr {
           font: italic 40px serif;
           fill: red;
         }
       </style>
    
       <rect width="240" height="80" rx="20" ry="20" fill="white" />
    
       <text x="20" y="35" class="small">My</text>
       <text x="40" y="35" class="heavy">cat</text>
       <text x="55" y="55" class="small">is</text>
       <text x="65" y="55" class="Rrrrr">Grumpy!</text>
     </svg>
  2. rust
     ui.add(
         egui::Image::from_bytes("bytes://image.svg".to_owned().into(), bytes)
             .max_width(500.0)
             .max_height(500.0),
     );
  3. Image

Expected behavior

I'm not familiar enough with the standard to be able to ascertain exactly to what degree one should expect the text to not be in greek, but it is definitely surprising. The MDN seems to suggest that the output should look along these lines:

Image