question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Change `from` pattern for copying font files

See original GitHub issue

Current situation: Line 77 of the Webpack configuration defines the glob pattern for copying fonts from the source to the public folder. The pattern is currently defined as ./*.

Proposed improvement: I would like to update this pattern to ./**/*.*, as is already the case for images, so that font files which are located in their own subfolders also match the pattern. In my experience, this is frequently the case and changing the pattern would save others the time I spent last Friday trying to debug why my fonts are not being copied over. 😅

I’m happy to open a pull request if you consider this a desirable improvement.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
renestaldercommented, Dec 5, 2018

This is due to the version of pattern-lab core that’s being used, it was a fork of the gulp version and needed to copy files at that time. I am in full support of changes and improvements. You can fork the repo and follow the other contributing guidelines. I would like to get this version working with the latest version of the core, though my day job has prevented me to really spend a lot of time outside of patches on this project.

I’m not sure I can provide the implementation of the latest core, but at least I could extend the Webpack functionality to get rid of the manual copy config and rely to the dependency tree of Webpack during build. I already applied those changes in most project where I used Comcast’s Webpack editions, so I for sure could provide this change via a pull request. Will have to check how much time it takes me.

0reactions
ItsJepsercommented, Dec 5, 2018

@ItsJepser I believe the path is from the public folder, you should just be able to do /public/ and the folder where fonts live go there. Unless you’re using a CDN. I would think a copy of fonts would be enough, a loader isn’t the issue or needed.

Even when I use /public/ the font isn’t loaded in when I try to select it in font-familiy:

We’ve tried alot of loaders, without success. The only thing we’re able to do, is download the woff file if we go to: http://localhost:3000/fonts/fontfolder/fontfile.woff

Could you help us with an example?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to add patterns to text in Photoshop - YouTube
In this tutorial, I'm going to show you how to add patterns and textures to typography in Adobe Photoshop using clipping masks.
Read more >
Video: Copy formatting - Microsoft Support
Copy and apply formatting · Select the text, shape, cells, or picture that has the format you want to copy. · Select Format...
Read more >
Copy the fill and formatting from one shape to another
To change several shapes, click the shape you want to copy, then press and hold Ctrl while you click the shapes you want...
Read more >
Photoshop productivity hack: Paste and Match Style alternative
This small hack is the best alternative for the Paste and Match Style feature missing from Photoshop.
Read more >
Copy and paste text styles in Pages on Mac - Apple Support
Select the text with the style you want to copy. The style of the first character in the text selection is what's copied....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found