Page 1 of 1

Having trouble setting up custom fonts

Posted: Fri Feb 14, 2020 12:59 pm
by duceduc
I am having a hard time figuring out why the custom font not working in ver 6.1. The old setup works, but when I try to setup the new method using Tony's tutorial, it does not display the font choosen.
https://tonyredhead.com/pano2vr-little- ... beta-fonts

This is the css I have paste in the skin's embedded stylesheet. The fonts are in my project folder under 'assets'.

Code: Select all

.ggskin { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px;}

@font-face{
            font-family: RobotoCondensed-Regular;
            src: url(assets/Roboto-Condensed-Regular.woff);
            }
@font-face{
            font-family: RobotoCondensed-Light;
            src: url(assets/Roboto-Condensed-Light.woff);
            }
@font-face{
            font-family: RobotoCondensed-Bold;
            src: url(assets/Roboto-Condensed-Bold.woff);
            }

body, html { font-family: "RobotoCondensed-Regular"; font-size: 18px;}
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 { font-family: "RobotoCondensed-Bold"; font-size: 26px;}

.controller { 
            font-family: "RobotoCondensed-Light";
            font-size: 14px;
            }

.start_button, .intro_title { 
            font-family: "RobotoCondensed-Light";
            font-size: 28px;
            }
			
.intro_desc { 
            font-family: "RobotoCondensed-Light";
            font-size: 22px;
            }

Re: Having trouble setting up custom fonts

Posted: Fri Feb 14, 2020 2:13 pm
by Tony
Hi,

Can you try changing the code to this where the font-family is the same as the src: naming and let me know how you get on. I just did a test and it worked fine using a similar code.

Code: Select all

.ggskin { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px;}

@font-face{
            font-family: RobotoCondensed-Regular;
            src: url(assets/Roboto-Condensed-Regular.woff);
            }
@font-face{
            font-family: RobotoCondensed-Light;
            src: url(assets/Roboto-Condensed-Light.woff);
            }
@font-face{
            font-family: RobotoCondensed-Bold;
            src: url(assets/Roboto-Condensed-Bold.woff);
            }

body, html { font-family: "Roboto-Condensed-Regular"; font-size: 18px;}
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 { font-family: "Roboto-Condensed-Bold"; font-size: 26px;}

.controller { 
            font-family: "Roboto-Condensed-Light";
            font-size: 14px;
            }

.start_button, .intro_title { 
            font-family: "Roboto-Condensed-Light";
            font-size: 28px;
            }
			
.intro_desc { 
            font-family: "Roboto-Condensed-Light";
            font-size: 22px;
            }
            
The result of my test.

custom-fonts.jpg
custom-fonts.jpg (729.81 KiB) Viewed 3346 times
cheers,

Tony

Re: Having trouble setting up custom fonts

Posted: Fri Feb 14, 2020 2:49 pm
by duceduc
It's still not working. I have copied and pasted your edited code into my skin. Could it be the font file's corrupted? It is the same files used with the old method.

Re: Having trouble setting up custom fonts

Posted: Fri Feb 14, 2020 2:52 pm
by Tony
I will post a whole project in the morning. It’s late here now.

Tony