Google fonts on my website are working as expected only if I open the index file from my compuer. When I upload it on internet, font does not work properly (see the pictures and code below). Thanks for the help! :)
URL: http://veganrecipes.clanweb.eu/
html code:
<head>
<title>Krajčírstvo Jana Fürhofferová</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="styles.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Dancing+Script&display=swap" rel="stylesheet">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Comfortaa:wght@300&family=Dancing+Script&display=swap" rel="stylesheet">
css code:
.navbar-brand {
font-size: 4vw;
text-align: center;
font-family: 'Dancing Script', cursive;
}
.nav-item {
font-size: 25px;
font-family: 'Comfortaa', cursive;
padding: 15px;
}
.heading {
font-size: 30px;
font-family: 'Comfortaa', cursive;
text-align: left;
font-weight: bold;
}
p {
font-size: 20px;
font-family: 'Comfortaa', cursive;
text-align: left;
line-height: 160%;
}
.text {
line-height: 200%;
}
For the start you can try setting meta tag: