Sub topic 7
Adding Adobe Fonts through a web project
This chapter assumes you can write a link element in a page's head, set font-family in CSS, and read the Network panel in your browser's developer tools. It also assumes you have read the earlier chapter on font-family stacks.
What a web project is
Adobe Fonts does not give you a URL per family, as Google Fonts does. You collect fonts into a web project, and Adobe generates one stylesheet URL for the whole project. The URL contains a project ID. Your page loads that stylesheet, and the stylesheet declares the @font-face rules for every font in the project.
You need an Adobe account with a plan that includes Adobe Fonts, such as a Creative Cloud subscription. Your visitors do not need an account. The fonts are licensed for use through the project. They are not files you download and host yourself.
Creating a project
- Sign in at fonts.adobe.com and browse or search for a font.
- Open the family page and choose Add to web project. Create a new project or pick an existing one.
- In the project, select the weights and styles you need. Each one adds to what the browser must download, so choose as you would for Google Fonts.
- Copy the embed code from the project page.
Linking the project stylesheet
The embed code is a stylesheet link. Put it in the head of every page that uses the fonts. Replace your-project-id with the ID shown on your project page.
<link rel="stylesheet" href="https://use.typekit.net/your-project-id.css">The domain typekit.net is a leftover from the service's earlier name, Typekit. It is the correct host for Adobe Fonts. The project page also offers a JavaScript embed. The plain stylesheet link is simpler and does not depend on a script running, so prefer it unless you have a reason not to.
Referencing the font in CSS
Adobe Fonts gives each font a CSS family name. It is often lowercase and hyphenated, and it may not match the name in the catalog. Copy it from the project page. This example assumes the project includes Proxima Nova at weight 700.
h1, h2 {
font-family: "proxima-nova", Helvetica, Arial, sans-serif;
font-weight: 700;
}The fallback stack works as it does for any web font. If the project stylesheet fails to load, or the font has not arrived yet, the browser uses Helvetica, then Arial, then any sans-serif font.
Checking that it works
A page can look fine because a fallback font resembles the web font. Verify in developer tools instead:
- In the Network panel, filter by Font. You should see font files requested after
use.typekit.net/your-project-id.cssloads. - In the Elements panel, select a heading and open the Computed tab. The Rendered Fonts section shows which font the browser actually used. If it lists Helvetica or Arial, the project font did not apply.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| Fallback font renders | Wrong family name in CSS | Copy the name from the project page |
| Bold text looks smeared | Weight 700 not in the project | Add that weight to the project |
| Font works on one page only | Link missing from other pages | Add the link to a shared template |
| Fonts stop loading after a project change | Old project ID in the link | Use the ID shown on the current project page |
How this differs from Google Fonts
With Google Fonts you put the family and weights in the URL. With Adobe Fonts you pick them in the project, and the URL stays the same. You can add or remove fonts in the project without editing your pages, although the downloaded files change with the project. That is convenient, but it moves part of your page's behavior out of your code and into an account setting. Keep a note of which project each site uses.
Exercise
Your heading font renders in Arial even though the project stylesheet link is in the page. The Network panel shows use.typekit.net/your-project-id.css loading with status 200, but no font files are requested. Name two things to check.
Show answer
First, confirm the CSS family name matches the one shown on the project page, including hyphens and case, because a mismatch makes the browser skip the web font and use the next family in the stack. Second, confirm the font and the weight you request are actually added to the project. A project with no matching font produces no font request.