Skip to content

Custom Fonts not working #13583

Discussion options

You must be logged in to vote

As per the syntax for src in @font-face according to MDN, you'd want truetype, not ttf for the format() values:

 @layer base {
   @font-face {
     font-family: "Ubuntu";
     font-weight: 400;
-    src: url("../public/fonts/Ubuntu-Regular.ttf") format("ttf");
+    src: url("../public/fonts/Ubuntu-Regular.ttf") format("truetype");
   }
 
   @font-face {
     font-family: "Ubuntu";
     font-weight: 500;
-    src: url("../public/fonts/Ubuntu-Medium.ttf") format("ttf");
+    src: url("../public/fonts/Ubuntu-Medium.ttf") format("truetype");
   }
 
   @font-face {
     font-family: "Ubuntu";
     font-weight: 700;
-    src: url("../public/fonts/Ubuntu-Bold.ttf") format("ttf");
+    src: url("…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@MehrshadHeisenberg3
Comment options

@wongjn
Comment options

Answer selected by MehrshadHeisenberg3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants