1. bel.gio
  2. Free Templates / Extensions
  3. Friday, 04 September 2015
  4.  Subscribe via email
Hi,

I'd like to add a ttf font for logo text, it is possible?

I have copied ttf file in ../templates/j51_classic/fonts directory ed I have modified ../templates/j51_classic/elements/googlefonts.php as specified in this tutorial, but It doesn't work.

thanks in advance.
Accepted Answer Pending Moderation
0
Votes
Undo
Hello

Modifying the googlefonts.php will only work if you are working with a Google font which I suspect is not the case?

You could try using the @font-face method as described in the following article.. https://css-tricks.com/snippets/css/using-font-face/

CSS can be added to the Custom CSS field of your templates parameters.

Ciarán
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 1
Accepted Answer Pending Moderation
0
Votes
Undo
Yes,

the font I'd like to use isn't a google font ;) .

I'll try to use @font-face
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 2
Accepted Answer Pending Moderation
0
Votes
Undo
Hi,

I've created my CSS for @font-face and I've put it in Custom CSS, I've copied all font files in ../fonts/ directory
I've modify nexus.css file and I've entered the line
font-family: 'myfont', Verdana, sans-serif;

in h1.logo-text directive, but it doesn't seem to work.

I'd like to know which are the other css files I've to modify for using it.

Thanks
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 3
Accepted Answer Pending Moderation
0
Votes
Undo
Hello

Could I ask you to post the @font-face CSS you are using?

Ciarán
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 4
Accepted Answer Pending Moderation
0
Votes
Undo
Hi
this is my @font-face

@font-face {
font-family: 'Myfont';
src: url('../fonts/Myfont.eot');
src: url('../fonts/Myfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/Myfont.woff2') format('woff2'),
url('../fonts/Myfont.woff') format('woff'),
local('Myfont'), url('../fonts/Myfont.ttf') format('truetype'),
url('../fonts/Myfont.svg#svgMyfont') format('svg');
}
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 5
Accepted Answer Pending Moderation
0
Votes
Undo
Looks good!

Would you also have a URL to an example of your text?

Ciarán
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 6
Accepted Answer Pending Moderation
0
Votes
Undo
this is the URL of my site

asdlavemomombello

Logo text should appear like attached file
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 7
Accepted Answer Pending Moderation
0
Votes
Undo
Hello

There appears to be a 404 error for the location of your font file. Going by your CSS you should have it located at http://asdlavenomombello.tk/joomla/fonts/LHANDW.ttf ?

Ciarán
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 8
Accepted Answer Pending Moderation
0
Votes
Undo
Hello,

thanks for support, fonts files are in http://asdlavenomombello.tk/joomla/templates/j51_classic/fonts
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 9
Accepted Answer Pending Moderation
0
Votes
Undo
Hi,

I have copied fonts files in http://asdlavenomombello.tk/joomla/fonts/, but it works only in some pages (like "Rassegna Stampa";).

I've tried to modify @font-face file

@font-face {
font-family: 'Myfont';
src: url('../templates/j51_classic/fonts/Myfont.eot');
src: url('../templates/j51_classic/fonts/Myfont.eot?#iefix') format('embedded-opentype'),
url('../templates/j51_classic/fonts/Myfont.woff2') format('woff2'),
url('../templates/j51_classic/fonts/Myfont.woff') format('woff'),
local('Myfont'), url('../fonts/Myfont.ttf') format('truetype'),
url('../templates/j51_classic/fonts/Myfont.svg#svgMyfont') format('svg');
}


but I had the same result: it works only in menu item root (with exception of home)
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 10
Accepted Answer Pending Moderation
0
Votes
Undo
Hello

To resolve try using the full URL to your font files (eg. http://www.asdlavenomombello.tk/joomla/templates/j51_classic/fonts/Myfont.eot) in your font-face CSS.

Ciarán
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 11
Accepted Answer Pending Moderation
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 12
Accepted Answer Pending Moderation
0
Votes
Undo
Hi,

I've modified @font-face and I've moved it in custom.css file, and now it works fine

This is my code


@font-face {
font-family: 'Myfont';
src: url('../fonts/Myfont.eot');
src: url('../fonts/Myfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/Myfont.woff2') format('woff2'),
url('../fonts/Myfont.woff') format('woff'),
local('Myfont'), url('../fonts/Myfont.ttf') format('truetype'),
url('../fonts/Myfont.svg#svgLHANDW') format('svg');
}


Thanks to ciaràn for support
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 13
Accepted Answer Pending Moderation
0
Votes
Undo
Great!! Thank you for the update! :)

Ciarán
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 14
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!