adding new fonts...

Started by Sharjeel66, January 27, 2006, 08:18:30 PM

Previous topic - Next topic

Sharjeel66

me and hassan are working on a completly urdu forum.

we have some urdu fonts but need to embed them into SMF so when you select font you have urdu in there as well (for when you type in text fields)....


how can i do this?

H

The article here explains it a bit:
http://www.spoono.com/html/tutorials/tutorial.php?id=19

but apparently embedding fonts is not compatible with many browsers.

Surely there are multiple urdu fonts which urdu people have by default anyway?

Cant you just specify them in CSS in priority order?
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

AlanM

#2
I've managed to use a custom font for my posts..

What I wanted to do was have my own handwriting in my posts. Here's what I did.

First created a TTF of my handwriting using this website.
hxxp:www.fontifier.com/ [nonactive]

Then, as per the post above, downloaded and installed the WEFT tool and converted my TTF to an .eot file.

Uploaded the .eot to my webspace and then edited the css of my SMF to include the following:


@font-face {
    font-family: myname;
    font-style:  normal;
    font-weight: normal;
    src: url(http://path/to/fontname.eot);
}


.myname {
font-family: myname, Verdana, sans-serif;
font-size: 18px;
color: #000000;
}


Then made sure BB code was enabled and the HTML option was ticked in SMF admin.

Then created a post as follows:

[html]<div class="myname">Just testing a post in my own handwriting.... </div> [/html]

Which resulted in this:



Tested in IE6, IE7 and FF2 no problems and on various PC's that didn't have my custom font installed in c:\Windows\Fonts.

What I would now like to know if there's a way to automatically include the BB tags and div statement when I go to create a new post or create a reply?

Dannii

You don't need extra fonts. Urdu is part of UTF-8, so any reasonable UTF-8 compatible browser should support it.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Kettu

I just wanted to tell you, that the tutorial doesn't work this way nomore, because @font-face is not supported by most new browsers.

But if the user has installed the ttf, he can see it correctly, else it will be shown in the alternative font Verdana or sans-serif. So you don't need WEFT.
Main Forum: SMF 2.0.6
Co-Forum: SMF 2.0.6

Advertisement: