Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tutorial] Preview Fonts
#1
[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!
Reply
#2
My dear, this is not the right forum for posting this thread. On the other hand, why do you call it a tutorial? Huh
Reply
#3
(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.
Reply
#4
It just shows the fonts like that see in the frontpage or any other html editor,
Good Tutorial Smile
Reply
#5
Good Tutorial
[Image: 1698077286_free-bitcoin.gif]
Reply
#6
A must feature in 1.6!
Reply
#7
waov its really small one but its useful thx
<snip - read the rules>
Reply
#8
good tutorial and very useful!!

thanks!!!
Reply
#9
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;
Reply
#10
So simple, yet I never thought about it. Thank you very much!
English Exercises - Under construction
Motorbike Games
- Motorcycle games arcade.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)