Score:-1

How can I migrate a font library?

in flag

I have a Drupal 7 multi-site platform which contains a sites/all/libraries/fonts/<fontname> directory, where there are several font files.

I am porting one of the Drupal 7 sites to a new Drupal 9 platform, where I have created a Drupal 9 version of the theme. I want to use these fonts on the Drupal 9 site.

Where should I copy these font files? How do I tell the Drupal 9 theme about them?

No Sssweat avatar
ua flag
`To where should I copy these D7 font files on the new D9 site` somewhere on your D9 custom theme's folder. `how do I tell the D9 theme about them?` [Add them to your CSS](https://www.w3schools.com/css/css3_fonts.asp)
Score:1
in flag

It appears that you don't need to update the theme YAML files (theme.info.yml, theme.libraries.yml) to tell Drupal about the new font, just copying the font directory across to somewhere inside the D9 theme, and referencing it in the CSS was enough, as suggested in the comments.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.