(sorry! i accidentally deleted my post when i meant to edit!!
by title i mean-- using custom fonts in my folders on my PC instead of those ones found on Google Fonts. to clarify first, it is a font i can use- i purchased it and it allows this kind of use!
I generally understand what to do, i think. I read the narrat documents page for custom fonts. and i feel like i get it? also read some other articles too for clarity and it all looked correct. another thing is i saw in the narrat doc that the font names were written with apostrophes around them like âredeemgoldâ but i also saw on sites like w3school that there wasnt any. and i notice that when i try to use apostrophes is turns into quotes so⌠perhaps that is an issue? not sure which thing is right.
Except you want to use format("woff") if itâs a .woff file, etc. (Practically you want to use a web font like .woff/.woff2 because theyâre smaller.)
thanks, this worked ^^ prior i also realized i had missed the folder path in that original code, and i had tried it before this but, had it as public/fonts/redeemgold.woff and that didnât workâŚ!
i am having the same issue again though as i add another font, that will be all of the other general text of the game-- just copied the same thing as before- changing the paths to fit of course. was sure if the new font-face should be seperate from the other but, either way it didnt seem to change anything. is there something else i should be doing for a second font?
the font name you put in font-family has to match the actual name of the font, which isnât necessarily the same thing as the file name. If you open the font on your pc the windows font viewer thing shows you its actual name somewhere
are you sure itâs truetype and not woff2 or something? I donât know how browsers behave if you specify the format wrong
also are you sure the font is actually applied to what youâre looking at? In the game if you right click on text and click inspect, you can see the text element in the devtools inspector menu. On the right side of those devtools it shows which css rules are being applied to it. You can check that it does have the font family you provided
you can also check in the network tab that the font file loaded properly
also I think weâre supposed to specify font-weight and font-style when loading fonts. Iâm not sure how it behaves when we donât. Iâve noticed fonts before just not appearing when theyâre being displayed at a different weight than the ones provided by the font (bold/not bold)
Otherwise yeah web fonts are a bit awkward to setup sometimes, you can look at web font guides online, narrat doesnât do anything special here itâs just standard css features
thanks for the suggestions-- not home atm but i will try them asap. the file name may well be the issue. i didnt think about it as i changed âredeemgoldâ from âRedeemGoldâ, and i did in fact change âMatchâ from âMatch 7pâ as i wanted to get rid of the space. i will also make sure about the other things, but the mention of file name immediately made me think about that.
can confirm, the file name was it. i wanted to see at all if i could change that name in the font anyways as i like to avoid spaces in anything w coding and was able to use a program called âfontforgeâ to edit this, which was handy.