Web Font
- Google Fonts: Download (@font-face)
- Google Fonts: Online
- Google Fonts: Families
- Google Fonts: Styles
- Google Fonts: Variable
- References
Google Fonts: Download (@font-face)
google-fonts-download
├── css
│ └── style.css
├── fonts
│ └── Lobster-Regular.ttf
└── index.html
google-fonts-download/css/styles.css
@font-face{
font-family: Lobster;
src: url(../fonts/Lobster-Regular.ttf)
}
h1 {
font-family: Lobster, cursive;
}
google-fonts-download/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<h1>Web font</h1>
<p>Lorem ipsum dolor</p>
</body>
</html>
Google Fonts: Online
google-fonts-online
├── css
│ └── style.css
├── fonts
│ └── Lobster-Regular.ttf
└── index.html
google-fonts-online/css/styles.css
h1 {
font-family: Lobster, cursive;
}
google-fonts-online/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Lobster&display=swap">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<h1>Web font</h1>
<p>Lorem ipsum dolor</p>
</body>
</html>
Google Fonts: Families
google-fonts-families
└── index.html
google-fonts-families/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link href="https://fonts.googleapis.com/css2?family=Lobster&family=Roboto&display=swap" rel="stylesheet">
<style>
h1 {
font-family: 'Lobster', cursive;
}
p {
font-family: 'Roboto', sans-serif;
}
</style>
</head>
<body>
<h1>Web font</h1>
<p>Lorem ipsum dolor</p>
</body>
</html>
Google Fonts: Styles
google-fonts-styles
└── index.html
google-fonts-styles/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link href="https://fonts.googleapis.com/css2?family=Lobster&family=Roboto:wght@400;900&display=swap" rel="stylesheet">
<style>
h1 {
font-family: 'Lobster', cursive;
}
p {
font-family: 'Roboto', sans-serif;
}
</style>
</head>
<body>
<h1>Web font</h1>
<p>Lorem ipsum <strong>dolor</strong></p>
</body>
</html>
Google Fonts: Variable
google-fonts-variable
├── css
│ └── style.css
├── fonts
│ └── Kufam-VariableFont_wght
└── index.html
google-fonts-variable/css/styles.css
@font-face{
font-family: 'Kufam';
src: url(../fonts/Kufam-VariableFont_wght.ttf)
}
h1 {
font-family: 'Kufam', cursive;
font-variation-settings: 'wght' 850;
}
google-fonts-variable/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<h1>Web font</h1>
<p>Lorem ipsum dolor</p>
</body>
</html>
References
- Web Fonts:
- Google Fonts:
- Variable Fonts
- Fonts Gallery:
unicode-range
: