Current time: 08-01-2014, 10:30 PM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tutorial] Preview Fonts
05-22-2009, 11:21 AM
Post: #1
[Tutorial] Preview Fonts
[Image: attachment.php?aid=8]
This tutorials shows you how to preview fonts in the drop-down menu while posting, so you know what they look like.

Open jscripts/editor.js

Find:

Code:
        this.fonts["Arial"] = "Arial";
        this.fonts["Courier"] = "Courier";
        this.fonts["Impact"] = "Impact";
        this.fonts["Tahoma"] = "Tahoma";
        this.fonts["Times New Roman"] = "Times New Roman";
        this.fonts["Trebuchet MS"] = "Trebuchet MS";
        this.fonts["Verdana"] = "Verdana";

Replace with:

Code:
        this.fonts["Arial"] = "<span style='font-family: Arial;'>Arial</span>";
        this.fonts["Courier"] = "<span style='font-family: Courier;'>Courier</span>";
        this.fonts["Impact"] = "<span style='font-family: Impact;'>Impact</span>";
        this.fonts["Tahoma"] = "<span style='font-family: Tahoma;'>Tahoma</span>";
        this.fonts["Times New Roman"] = "<span style='font-family: Times New Roman;'>Times New Roman</span>";
        this.fonts["Trebuchet MS"] = "<span style='font-family: Trebuchet MS;'>Trebuchet MS</span>";
        this.fonts["Verdana"] = "<span style='font-family: Verdana;'>Verdana</span>";

And you're done!
Find all posts by this user
Quote this message in a reply
05-22-2009, 12:51 PM (This post was last modified: 05-22-2009 12:51 PM by maatty.)
Post: #2
RE: [Tutorial] Preview Fonts
My dear, this is not the right forum for posting this thread. On the other hand, why do you call it a tutorial? Huh
Visit this user's website Find all posts by this user
Quote this message in a reply
05-22-2009, 08:02 PM (This post was last modified: 05-22-2009 08:07 PM by Anman.)
Post: #3
RE: [Tutorial] Preview Fonts
(05-22-2009 12:51 PM)maatty Wrote:  My dear, this is not the right forum for posting this thread.

Err yes, it is. (read the sticky)

(05-22-2009 12:51 PM)maatty Wrote:  On the other hand, why do you call it a tutorial?

It explains how to do something, therefore, by definition, it is a tutorial.
Find all posts by this user
Quote this message in a reply
05-23-2009, 06:14 PM
Post: #4
RE: [Tutorial] Preview Fonts
It just shows the fonts like that see in the frontpage or any other html editor,
Good Tutorial Smile
Visit this user's website Find all posts by this user
Quote this message in a reply
05-24-2009, 09:16 AM
Post: #5
RE: [Tutorial] Preview Fonts
Good Tutorial

[Image: 1698077286_free-bitcoin.gif]
Find all posts by this user
Quote this message in a reply
05-24-2009, 09:57 AM
Post: #6
RE: [Tutorial] Preview Fonts
A must feature in 1.6!
Find all posts by this user
Quote this message in a reply
06-03-2009, 10:42 PM
Post: #7
RE: [Tutorial] Preview Fonts
waov its really small one but its useful thx

<snip - read the rules>
Visit this user's website Find all posts by this user
Quote this message in a reply
06-04-2009, 03:32 AM
Post: #8
RE: [Tutorial] Preview Fonts
good tutorial and very useful!!

thanks!!!

Hattrick Chile
Find all posts by this user
Quote this message in a reply
02-05-2011, 05:11 AM
Post: #9
RE: [Tutorial] Preview Fonts
We also make it for Text size preview.
Code:
        // An array of font sizes to be shown.
        this.sizes = new Object();
        
        this.sizes["xx-small"] = "<span style=\"font-size: xx-small;\">XX-Small</span>"; //this.options.lang.size_xx_small;
        this.sizes["x-small"] = "<span style=\"font-size: x-small;\">X-Small</span>"; //this.options.lang.size_x_small;
        this.sizes["small"] = "<span style=\"font-size: small;\">Small</span>"; //this.options.lang.size_small;
        this.sizes["medium"] = "<span style=\"font-size: medium;\">Medium</span>"; //this.options.lang.size_medium;
        this.sizes["large"] = "<span style=\"font-size: large;\">Large</span>"; //this.options.lang.size_large;
        this.sizes["x-large"] = "<span style=\"font-size: x-large;\">X-Large</span>"; //this.options.lang.size_x_large;
        this.sizes["xx-large"] = "<span style=\"font-size: xx-large;\">XX-Large</span>"; //this.options.lang.size_xx_large;

http://forum.luyenkim.org Teaching Resource Forum
List of MyBB 1.4* and 1.6* plugins
Visit this user's website Find all posts by this user
Quote this message in a reply
02-09-2011, 11:49 AM
Post: #10
RE: [Tutorial] Preview Fonts
So simple, yet I never thought about it. Thank you very much!

English Exercises - Under construction
Motorbike Games
- Motorcycle games arcade.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication