An easy way to add fonts to your website
- What Fonts Can Be Used on the Web?
- 1. System Fonts
- 2. Web Safe Fonts
- 3. Web Fonts from Online Services
- 4. Self-hosted Fonts
- 5. SVG Fonts
- 6. Icon Fonts
- Summary:
- Different Font Formats and Browser Support
- 1. TrueType Fonts (TTF)
- 2. OpenType Fonts (OTF)
- 3. Web Open Font Format (WOFF)
- 4. Web Open Font Format 2 (WOFF2)
- 5. Embedded OpenType (EOT)
- 6. SVG Fonts
- 7. CSS @font-face
- Summary:
- Methods to Add Fonts to Your Website
- Conclusion
What Fonts Can Be Used on the Web?
There are many types of fonts that can be used on the web, including system fonts, custom fonts, and fonts from external services. Below are the most common types of web fonts:
1. System Fonts
These are the default fonts on a user's operating system and do not require downloading. They help save page load time and ensure broad compatibility.
- Windows: Arial, Times New Roman, Verdana, Tahoma, Courier New
- macOS: Helvetica, Arial, Times, Courier, Georgia
- Linux: DejaVu Sans, Ubuntu, Liberation Sans
2. Web Safe Fonts
These are fonts that are widely used across different operating systems and browsers, ensuring the best compatibility.
- Serif: Times New Roman, Georgia, Palatino
- Sans-serif: Arial, Helvetica, Verdana, Tahoma, Trebuchet MS
- Monospace: Courier New, Lucida Console, Consolas
- Cursive: Comic Sans MS, Brush Script
- Fantasy: Impact, Papyrus
3. Web Fonts from Online Services
These fonts are not pre-installed on operating systems but can be downloaded from external services like Google Fonts, Adobe Fonts (formerly Typekit), or other font libraries.
-
Google Fonts: A free service offering thousands of customizable fonts for the web. Popular fonts include:
- Roboto
- Open Sans
- Lora
- Montserrat
- Poppins
-
Adobe Fonts: A premium service providing high-quality fonts from Adobe. Notable fonts include:
- Proxima Nova
- Source Sans Pro
- Roboto Condensed
- Fira Sans
4. Self-hosted Fonts
For custom fonts that are not available on web services, you can upload font files like TTF, OTF, WOFF, or WOFF2 and use them on your website via the @font-face
CSS property. This is a common method for using branded or proprietary fonts.
5. SVG Fonts
SVG fonts are vector-based fonts (SVG format), but they are rarely used due to compatibility and performance issues.
6. Icon Fonts
Icon fonts, such as Font Awesome, Material Icons, or IcoMoon, provide icons in font format, allowing for easy and flexible use on websites.
Summary:
- System fonts and web-safe fonts are ideal for websites requiring broad compatibility and fast loading times.
- Web fonts and self-hosted fonts are perfect when you need custom, unique typography for your website.
- Icon fonts are best for using icons as fonts.
Choosing the right font depends on your design needs, page load speed, and project compatibility.
Different Font Formats and Browser Support
1. TrueType Fonts (TTF)
- Description: Developed by Apple and Microsoft, TTF is one of the most commonly used font formats.
- Supported Browsers:
- Chrome: Yes
- Firefox: Yes
- Safari: Yes
- Edge: Yes
- Internet Explorer: Yes
2. OpenType Fonts (OTF)
- Description: Similar to TTF, OTF was developed by Microsoft and Adobe, supporting extended features such as special characters.
- Supported Browsers:
- Chrome: Yes
- Firefox: Yes
- Safari: Yes
- Edge: Yes
- Internet Explorer: Yes
3. Web Open Font Format (WOFF)
- Description: Optimized for the web, WOFF provides a compressed version of TTF and OTF, reducing file size and improving page load speed.
- Supported Browsers:
- Chrome: Yes
- Firefox: Yes
- Safari: Yes
- Edge: Yes
- Internet Explorer: Yes (WOFF 1.0)
4. Web Open Font Format 2 (WOFF2)
- Description: An improved version of WOFF with higher compression rates, further reducing file sizes.
- Supported Browsers:
- Chrome: Yes
- Firefox: Yes
- Safari: Yes
- Edge: Yes
- Internet Explorer: No
5. Embedded OpenType (EOT)
- Description: Developed by Microsoft, EOT is mainly used in older versions of Internet Explorer.
- Supported Browsers:
- Chrome: No
- Firefox: No
- Safari: No
- Edge: No
- Internet Explorer: Yes
6. SVG Fonts
- Description: SVG fonts use XML-based vector graphics to display characters but are rarely used due to compatibility and performance issues.
- Supported Browsers:
- Chrome: No
- Firefox: No
- Safari: Yes
- Edge: No
- Internet Explorer: No
7. CSS @font-face
- Description: Not a font format but a CSS method that allows you to use custom fonts without relying on pre-installed system fonts.
- Supported Browsers:
- Chrome: Yes
- Firefox: Yes
- Safari: Yes
- Edge: Yes
- Internet Explorer: Yes
Summary:
- Modern browsers like Chrome, Firefox, Safari, and Edge support common font formats such as TTF, OTF, WOFF, WOFF2, and CSS
@font-face
. - Older browsers like Internet Explorer may not fully support newer formats like WOFF2 but work well with TTF, OTF, and EOT.
- To ensure compatibility for all users, using WOFF and WOFF2 along with CSS
@font-face
is the best practice.
Methods to Add Fonts to Your Website
1. Using Google Fonts
Google Fonts provides thousands of free fonts that can be easily integrated into your website.
Steps:
- Go to Google Fonts.
- Search for and select the font you want to use.
- Choose font variations if needed.
- Copy the embed CSS code from the "Embed" section on the Google Fonts page.
- Paste the code inside the
<head>
section of your HTML file:
<head>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
</head>
- Use the font in your CSS file:
body {
font-family: 'Roboto', sans-serif;
}
2. Using Adobe Fonts (Typekit)
Adobe Fonts offers premium, high-quality fonts. You need an Adobe account to use this service.
Steps:
- Go to Adobe Fonts.
- Choose a font and create a font kit.
- After creating a kit, you will receive an embed code.
- Copy and paste the embed code into the
<head>
section of your HTML:
<head>
<link rel="stylesheet" href="https://use.typekit.net/xxxxxx.css">
</head>
- Use the font in your CSS:
body {
font-family: 'FontName', sans-serif;
}
Conclusion
No matter how much experience you have with CSS, this guide will help you add any font to any website building platform. At the same time, it’s also an important step in fixing web design issues, ensuring your website displays consistently and professionally across all browsers and devices.
Once you've added fonts, ask yourself:
- Can you customize the font's appearance? (weight, color, spacing, opacity, etc.)
- Can you adjust the website layout to make the font stand out?
For more flexibility, consider using a website builder like Pagecloud, which offers nearly unlimited font customization options. Sign up today to explore its features!