Here's how I tried to include a font in my HTML project:
@font-face {
font-family: 'Commodore';
url('Commodore-64-v6.3.ttf') format('truetype');
}
p {
font-family: Commodore;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Font Family Test</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<p>Lorem ipsum dolor sit amet.</p>
</body>
</html>The specified ttf font is in the same directory as the CSS and HTML files, but is not used? Instead it's using some Times -like font. Why?
Aucun commentaire:
Enregistrer un commentaire