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!

Join Our Newsletter

* indicates required
We respect your privacy and do not tolerate spam and will never sell, rent, lease or give away your information (name, email, number, etc.) to any third party. Nor will we send you unsolicited email.
Joomla51 - Mullaghmore, Co. Sligo, Ireland
Joomla51.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by
Open Source Matters
the trademark holder in the United States and other countries.

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.

Ok