I see cryptic (to me) posts regarding patches for Drupal 10; I am at a loss as to what to do. For example, on the below thread, I see instructions to add some code to the composer.json repositories section, however, my composer.json has no such section.

https://www.drupal.org/project/fontyourface/issues/3327763

Would it be possible to get clear, step-by-step instructions on how to install font-your-face for Drupal 10? It's not just font-your-face; as I'm trying to update sites, I see the same sort of thing with many different modules.

With Drupal 9 reaching end-of-life in less than a year, some clear documentation for those of us who are trying our best to keep up would be of enormous help!

Thank you in advance...

Comments

bcobin created an issue. See original summary.

hmendes’s picture

Hello bcobin.
This module is still not compatible with D10, at least in the dev and release branches.
If you still want to use it in a Drupal10 environment, before the changes are commited, you'll have to apply a patch to your project.
If you don't know how to do it, there are a lot of documentation to help you, this one might help: https://experienceleague.adobe.com/docs/commerce-operations/upgrade-guid... of even the https://github.com/cweagans/composer-patches doc.
But basically you'll have to install this cweagans/composer-patches, then add this on your composer.json

  "extra": {
    "patches": {
      "drupal/{module}": {
        "Title of issue": "link for the patch"
      }
    }
  }

for this module it could be smth like this:

  "extra": {
    "patches": {
      "drupal/fontyourface": {
        "Drupal 10 compatibility update": "https://git.drupalcode.org/project/fontyourface/-/merge_requests/1.diff"
      }
    }
  }

I got this patch from the merge request in #3327763: Drupal 10 compatibility update. I didn't test it yet, so idk if that will be the only change...
Also, if you have a D9 environment and want to migrate everything to D10, installing the Upgrade Status module might help you to figure out if a module is compatible with the new version or not.

bcobin’s picture

Thank you SO much, @hmendes! Both for the info and the quick response. This is just the sort of guidance that's invaluable and all too rare - every developer should include such info.

It's easy enough to install Google Fonts without the module; if I can figure out how to embed local fonts, I won't need the module at all - at least not right now.

Upgrade Status is a great tip; I do have one Drupal 9 site I recently deployed only to find out a week or two after launch that D9 is reaching end-of-life in November 2023. Nice.

Thanks again, and... Onwards! :)

UPDATE:

Downloading the @font-face kit gave me what I need - thanks!

https://www.cufonfonts.com/font/segoe-ui-4#google_vignette

hmendes’s picture

Status: Active » Fixed

Nice :)
Here I explained a reason why to use the module, if you want to #3307142-2: Advantage of this module?

bcobin’s picture

Thanks, @hmendes - going forward, I'll definitely be using @font-your-face once there's a Drupal 10 version; right now, I'm just trying to get through the night.

Thanks mucho! :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.