notmax123 commited on
Commit
d0a140b
·
1 Parent(s): e5e1cf3

Use EuclidCircularB font embedded from fonts/EuclidCircularB.woff2

Browse files
Files changed (1) hide show
  1. app.py +16 -3
app.py CHANGED
@@ -467,14 +467,27 @@ EXAMPLES = [
467
  ["Die Sonne scheint heute besonders hell über den Bergen.", "Male 1", "de"],
468
  ]
469
 
470
- css = """
471
- @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');
 
 
 
 
 
 
 
 
 
 
 
 
 
472
 
473
  * { box-sizing: border-box; }
474
 
475
  body, .gradio-container {
476
  background: #0a0a0f !important;
477
- font-family: 'Inter', sans-serif !important;
478
  color: #e8e8f0 !important;
479
  }
480
 
 
467
  ["Die Sonne scheint heute besonders hell über den Bergen.", "Male 1", "de"],
468
  ]
469
 
470
+ def _load_font_face() -> str:
471
+ font_path = "fonts/EuclidCircularB.woff2"
472
+ if os.path.exists(font_path):
473
+ with open(font_path, "rb") as f:
474
+ b64 = base64.b64encode(f.read()).decode()
475
+ return f"""@font-face {{
476
+ font-family: 'EuclidCircularB';
477
+ src: url(data:font/woff2;base64,{b64}) format('woff2');
478
+ font-weight: 100 900;
479
+ font-style: normal;
480
+ }}"""
481
+ return ""
482
+
483
+ css = _load_font_face() + """
484
+ @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');
485
 
486
  * { box-sizing: border-box; }
487
 
488
  body, .gradio-container {
489
  background: #0a0a0f !important;
490
+ font-family: 'EuclidCircularB', sans-serif !important;
491
  color: #e8e8f0 !important;
492
  }
493