how do you add a custom ttf font ?

shluk

Active member
Registered
Joined
May 10, 2021
Messages
40
Points
8

Reputation:

I have a ttf file for a custom font and I want it to be the font on a user group badge
how can one do this ?
 

sucre13

Moderator
Staff member
Moderator
Collaborate
Registered
Joined
Jan 19, 2019
Messages
836
Points
153

Reputation:

it doesn't help
I dont seem to have extra.css
I found extra.less
and tried pasting those codes but nothing changed
shlukthis post is from 2011 does not work in xenforo 2.2.5
 

shluk

Active member
Registered
Joined
May 10, 2021
Messages
40
Points
8

Reputation:

I managed to solve it :
1st you upload and set the ttf file of the custom font using the terminal:
on pc terminal
scp fontx.ttf user@ip:/var/www/html/domain/data

on server terminal after ssh login
cd /var/www/html/domain/data
sudo cp fontx.ttf /var/www/html/domain/styles/fonts

2nd I add the font to the extra.less :
PHP:
@font-face {
  font-family: 'fontx';
  src:  url(/styles/fonts/fontx.ttf);
}

and finally I use the font in the user group Username CSS :
font-family: fontx;
 

opolo

New member
Registered
Joined
Jul 18, 2021
Messages
3
Points
3

Reputation:

I managed to solve it :
1st you upload and set the ttf file of the custom font using the terminal:
on pc terminal
scp fontx.ttf user@ip:/var/www/html/domain/data

on server terminal after ssh login
cd /var/www/html/domain/data
sudo cp fontx.ttf /var/www/html/domain/styles/fonts

2nd I add the font to the extra.less :
PHP:
@font-face {
  font-family: 'fontx';
  src:  url(/styles/fonts/fontx.ttf);
}

and finally I use the font in the user group Username CSS :
font-family: fontx;
shlukThis cant solve problem.
i use IO Dark theme and dont have any "extra.less" or css file
 
Top