Hoping to find some coding help here. I'm using @font-face, and it's working on my local device (because the font is installed), but it's not working on the server.
/*THE @FONT-FACE CODE*/
@font-face {
font-family: BigNoodleTitling;
src: url('Files/Fonts/big_noodle_titling.ttf');
src: url('Files/Fonts/big_noodle_titling.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('Files/Fonts/big_noodle_titling.woff2') format('woff2'), /* Super Modern Browsers */
url('Files/Fonts/big_noodle_titling.woff') format('woff'), /* Pretty Modern Browsers */
url('Files/Fonts/big_noodle_titling.ttf') format('truetype'), /* Safari, Android, iOS */
url('Files/Fonts/big_noodle_titling.svg#svgFontName') format('svg'); /* Legacy iOS */
src: local('BigNoodleTitling');
/* BODY CODE */
body {
font-size: 100%;
font-family: BigNoodleTitling, Helvetica, Helvetica Neue, DIN Condensed Bold, Avenir, Times New Roman;
background-color: rgba(255,255,255,1.00);
}
/* CLASS CODE */
.nav {
max-width: 1000px;
min-width: 320px;
margin-left: auto;
margin-right: auto;
padding-bottom: 1px;
text-align: center;
}
.nav h2 {
font-family: 'BigNoodleTitling';
display: inline;
font-size: 32px;
padding: 10px;
color: #FFB8BB;
letter-spacing: 1.2px;
}
.nav h2 a {
color: #FFB8BB;
text-decoration: none;
}
.nav h2 a:hover {
color: #A17477;
text-decoration: none;
}
here's an example that werks
https://paste2.org/4n3XhJ2f
you did file url wrong, add ../
>>312853
This isn't the issue. I've tried fixing it by calling the file via "./" or "../". The "File" folder is on the same level as the css and html files, so that shouldn't be needed. Even when I use it, it doesn't fix the issue.
Go ask >>>/g/wdg
>>312854
oh yea, sorry, im a dumbass, i forgot the fonts in there are in a separate folder
if you make changes in css try force-reloading it with ctrl+f5
try specifying what weight the @font-face file refers to like in the example i posted
>>31285 I'm working on a mac, but shift+command+r does the same thing. I've also tried defining a weight and size. Doesn't work then either.
>>312857
well, ok, weird. you may try putting the font file through this thing using the code it generates with appropriate adjustments
https://transfonter.org
>>312858
>https://transfonter.org
...hate to tell you this, but I tried that as well. I actually started making this page with just a ttf. file. I made a kit to get all the other files.
I'm really at a loss here, I've tried almost every suggestion anyone has.
Try linking using the full path. So https://yoururl.com/fonts/etc....
>>312859
MAYBE there's an issue with file permissions on webserver
check browser developer console if font or css urls don't return 403 forbidden or something. i've had that kind of an issue before with files within the web server folder.
https://serverfault.com/questions/124800/how-to-setup-linux-permissions-for-the-www-folder
im pretty noob but consider this:
>>312855
fuck off
try removing 'Files/'
Each "/" represents a folder, so unless you have one folder called "Files" and everything else after that is in that folder, you don't need the Files/.
also, it looks like you have some shit in your code you don't need:
src: url('Files/Fonts/big_noodle_titling.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
you don't need this. you're already using .woff format, thats all you need to assure it works across web browsers.
try uploading the font to:
https://www.fontsquirrel.com/tools/webfont-generator
itll generate the right CSS for you.
>>312845
try this:
@font-face {
font-family: 'BigNoodleTilting';
src: url("../NameOfFolderYourFilesAreInGoesHere/_noodle_titling.woff2") format('woff2'),
url("../NameOfFolderYourFilesAreInGoesHere/big_noodle_titling.woff") format('woff');
font-weight: normal;
font-style: normal;
}