This is a migrated thread and some comments may be shown as answers.

[Solved] Problem with Font Names

1 Answer 132 Views
Editor
This is a migrated thread and some comments may be shown as answers.
suryakiran M
Top achievements
Rank 1
suryakiran M asked on 08 Sep 2009, 12:00 PM
I have added the following fonts in the ToolsFile.xml

1. Xerox Sans
2. Arial
3. Verdana

In the "Design" view, i have entered text : "sample text" and applied "Arial" font.
When i switch the view to "HTML", i see the html text as "sample text".

Now, in the design view, if i select the text and apply "Verdana" font, the HTML is shown as
"<span style="font-family: verdana;">sample text</span>"

I have two questions here :

1) When i have applied "Arial" font, why the html is not shown as "<span style="font-family: arial;">sample text</span>"?

2) Does telerik rad editor supports "Xerox Sans" font?
    If i see the fonts dropdown, both "Arial" & "Xerox Sans" entries appear to be displayed in same font style i.e of "Arial".

Any inputs would be of great help.

Thanks in advance
Surya.


1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 11 Sep 2009, 11:41 AM
Hi Surya,

Straight to the points:

1) This is a default behavior of the Rich Text Editing engine of the browser which RadEditor uses to not apply font name when the applied font is identical to the default font of the content area. In your case it seems that Arial is the default browser font. You can find this information explained in this KB article:

No FONT tags are applied when I type text in the editor.

2) As you probably know, fonts are not embedded on webpages or uploaded onto the server (except for the browsers that support @font-family: url() or the WEFT3 technology or sIFR pages). One of the main principles in web-programming is to refrain from using non-standard fonts, because if the particular font does not exist on visitor's machine, the browser will automatically look for the next font, specified in the font-family, i.e if we have:

selector
{
    font: normal 12px/22px "My Supercool Font", Arial, Sans-serif;
}


... but if our users do not have "My Supercool Font", their browser will automatically load Arial, because it is the second font in the the family. If no other font set, the browser will load it's default font.

In the light of the above - RadEditor will load any font that is existing on the machine, but will not load a font that is not present in the system - in such cases it will look for the next font in the family.

Sincerely yours,
Martin Ivanov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Editor
Asked by
suryakiran M
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or