Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Incorrect path to foundry's public fonts #857

Closed
ssg3Davins opened this issue Nov 29, 2024 · 5 comments
Closed

bug: Incorrect path to foundry's public fonts #857

ssg3Davins opened this issue Nov 29, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@ssg3Davins
Copy link

ssg3Davins commented Nov 29, 2024

In src/scss/core.scss the path should be one less ../,like everywhere else, otherwise it won't work with routeprefixes.
Current code:

@font-face {
  font-family: 'Signika';
  src: url('../../../fonts/signika/signika-light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: 'Signika';
  src: url('../../../fonts/signika/signika-semibold.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
}
@kgar
Copy link
Owner

kgar commented Nov 30, 2024

Hello, thanks for reporting.

I am good with removing the extra ../; however, as I understand it with route prefixing in Foundry, you can put extra ../ in these paths, but the main thing you don't want is to have too few of them. Disclaimer: this is just from memory when I last had to work on a route prefixing issue.

Have you observed issues with the current URLs with a route prefix applied? Is there a way for me to test and verify that it was broke before and fixed after? I took a cursory look, and I didn't see any obvious issues in devtools or elsewhere with the current URLs, so I just want to be able to observe the issue properly.

@kgar kgar added the question Further information is requested label Nov 30, 2024
@ssg3Davins
Copy link
Author

ssg3Davins commented Nov 30, 2024

Untitled

  1. is the url with url('fonts/signika/signika-semibold.woff2')
  2. is with the original url('../../../fonts/signika/signika-semibold.woff2')
    And with url('../../fonts/signika/signika-semibold.woff2') it works right, because the foundry public folders are served like https://domain.xyz/routePrefix/fonts/signika/signika-semibold.woff2, if you make the url with 3 or more ../ it would try to make the url go even further back, and if it can't then it won't make a difference ofc.

@kgar kgar self-assigned this Nov 30, 2024
@kgar kgar added bug Something isn't working and removed question Further information is requested labels Nov 30, 2024
kgar added a commit that referenced this issue Nov 30, 2024
[#857] fix: Public Font Paths in Tidy disagree with route prefixing
@kgar
Copy link
Owner

kgar commented Nov 30, 2024

I wasn't able to get errors to trigger with two or three ../ with route prefixing on, but I've gone ahead and made that correction. This will ship with Tidy V7.2.1.

I was using Chrome on a Windows 10 machine.

@kgar kgar added the awaiting-release This is awaiting release label Nov 30, 2024
@kgar
Copy link
Owner

kgar commented Dec 5, 2024

This is live on Tidy V7.2.1

@kgar kgar added pending-closure This issue may be resolved and is awaiting confirmation / enough time without a response to close. and removed awaiting-release This is awaiting release labels Dec 5, 2024
@kgar kgar removed the pending-closure This issue may be resolved and is awaiting confirmation / enough time without a response to close. label Dec 15, 2024
@kgar
Copy link
Owner

kgar commented Dec 15, 2024

Cheers. Let me know if you run into any trouble with this.

@kgar kgar closed this as completed Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants