How to Install Font in running site

General questions regarding the use of languages in Joomla! 1.5.

Moderator: General Support Moderators

Locked
neeraj10786
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 107
Joined: Tue Aug 17, 2010 8:13 am
Location: Delhi
Contact:

How to Install Font in running site

Post by neeraj10786 » Tue Feb 28, 2012 7:04 am

I want to run font "KRDV010" in my Joomla site. I have hindi content in this font "KRDV010"
and i have this font too
Please tell me what to do that this content work fine on the Joomla site
so that visitors can read my content easily, without installing this font

it's very urgent for me

aemiller
Joomla! Hero
Joomla! Hero
Posts: 2301
Joined: Sat Aug 29, 2009 3:08 am
Location: Akron PA
Contact:

Re: How to Install Font in running site

Post by aemiller » Fri Mar 09, 2012 2:33 am

These quotes were found at http://forum.joomla.org/viewtopic.php?f=474&t=356639

Firstly, you must do it in your themes'/template CSS file, like so;

@font-face {
font-family: RAVIE;
src: url('http://link_to_the_.TTFfont_file_on_your_server.com/RAVIE.TTF'); /* in the URL declaration you must specify the .TTF extension */
}

Then you can use the usual font-family declaration to call your font type.

p{
font-family: RAVIE; /* no .ttf */
}

And there you have it. now it doesn't matter if your visitors have that font type installed or not. everyone will see your font selection on your pages.
Enjoy!
;)

a small correction to my previous post. The above will be valid for any browser other than IE.

In order to make IE swallow what you're trying to fit down it's throat you'll have to convert the valid TTF font file to an Microsoft EOT format, and use the similar technique to embed your font into your page.

you can do it online here.

http://www.kirsle.net/wizards/ttf2eot.cgi

then use the same method as above for IE browsers

@font-face {
font-family: MyCustomFont;
src: url("BRLNSDB_-_Copy_-_Copy.eot") /* EOT file for IE */
}

Leave it to Microsoft to typically complicate everyone's life.. *again* no one can blame them for helping anyone except for themselves...
In the current version (JCE 2.0.4) the significant lines of code can be found in
administrator/components/com_jce/models/editor.php (approx. at line 486), namely
Code:
// Default font list
        $fonts = array(
            'Andale Mono=andale mono,times',
            'Arial=arial,helvetica,sans-serif',
            'Arial Black=arial black,avant garde',
            'Book Antiqua=book antiqua,palatino',
            'Comic Sans MS=comic sans ms,sans-serif',
            'Courier New=courier new,courier',
            'Georgia=georgia,palatino',
            'Helvetica=helvetica',
            'Impact=impact,chicago',
            'Symbol=symbol',
            'Tahoma=tahoma,arial,helvetica,sans-serif',
            'Terminal=terminal,monaco',
            'Times New Roman=times new roman,times',
            'Trebuchet MS=trebuchet ms,geneva',
            'Verdana=verdana,geneva',
            'Webdings=webdings',
            'Wingdings=wingdings,zapf dingbats'


Locked

Return to “Language - Joomla! 1.5”