7_Baira Praveen
7_Baira Praveen

Reputation: 13

How can I add custom font in static html project in stackblitz.com website, (fontface, ttf files) nothing seems to workout?

I created fonts folder, and placed mercury_font.ttf, still not working.

@font-face {
  font-family: 'Official';
  src: url('fonts/Mercury_Bold.ttf') format('truetype');
}

body {
  margin: 0 auto;
  max-width: 35em;
  padding: 4em 1em;
  color: #0a2458;
  font-family: 'Official',sans-serif;
}

Upvotes: 0

Views: 256

Answers (1)

Diego da Costa Porto
Diego da Costa Porto

Reputation: 11

Seems that exists a currently issue in stackblitz with project files for fonts. It works on a local project (yor code is correct). So, is not a solution, but an alternative is uplaod your file to a public server and use the url in the css file. As well, if you try with any google font you can check it.

Upvotes: 0

Related Questions