Bladeren bron

Workaround SVG font preload issue

Lutz Roeder 8 jaren geleden
bovenliggende
commit
e55c51aa95
2 gewijzigde bestanden met toevoegingen van 8 en 0 verwijderingen
  1. 4 0
      src/view-browser.html
  2. 4 0
      src/view-electron.html

+ 4 - 0
src/view-browser.html

@@ -17,6 +17,10 @@
 <div id='welcome' class='background' style='display: block'>
     <img id='logo' class='center' src='logo.svg' width='124' height='124'>
     <button id='open-file-button' class='center' style='top: 200px; width: 150px; display: none;'>Open ONNX Model...</button>
+    <!-- Preload fonts to workaround Chrome SVG layout issue -->
+    <div style='font-family: "Open Sans"; font-size: 10px; font-weight: normal; color: #e6e6e6'>.</div>
+    <div style='font-family: "Open Sans"; font-size: 10px; font-weight: 600; color: #e6e6e6'>.</div>
+    <div style='font-family: "Open Sans"; font-size: 10px; font-weight: bold; color: #e6e6e6'>.</div>
 </div>
 <div id='clock' class='background' style='display: none;'>
     <img class='center' src='logo.svg' width='124' height='124'>

+ 4 - 0
src/view-electron.html

@@ -17,6 +17,10 @@
 <div id='welcome' class='background' style='display: block'>
     <img id='logo' class='center' src='logo.svg' width='124' height='124'>
     <button id='open-file-button' class='center' style='top: 200px; width: 150px'>Open ONNX Model...</button>
+    <!-- Preload fonts to workaround Chrome SVG layout issue -->
+    <div style='font-family: "Open Sans"; font-size: 10px; font-weight: normal; color: #e6e6e6'>.</div>
+    <div style='font-family: "Open Sans"; font-size: 10px; font-weight: 600; color: #e6e6e6'>.</div>
+    <div style='font-family: "Open Sans"; font-size: 10px; font-weight: bold; color: #e6e6e6'>.</div>
 </div>
 <div id='clock' class='background' style='display: none;'>
     <img class='center' src='clock.svg' width='124' height='124'>