Having trouble setting up custom fonts

Q&A about the latest versions
Post Reply
duceduc
Posts: 37
Joined: Sun Dec 11, 2016 5:39 pm

Fri Feb 14, 2020 12:59 pm

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;
            }
User avatar
Tony
Posts: 913
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Fri Feb 14, 2020 2:13 pm

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 865 times
cheers,

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: http://tonyredhead.com - http://redsquare.com | roundme: http://round.me/@tonyredhead | instagram: https://www.instagram.com/tonyredhead/
duceduc
Posts: 37
Joined: Sun Dec 11, 2016 5:39 pm

Fri Feb 14, 2020 2:49 pm

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.
User avatar
Tony
Posts: 913
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Fri Feb 14, 2020 2:52 pm

I will post a whole project in the morning. It’s late here now.

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: http://tonyredhead.com - http://redsquare.com | roundme: http://round.me/@tonyredhead | instagram: https://www.instagram.com/tonyredhead/
Post Reply