By Duarte Costa on
how to add fonts in TinyMCE ? i want to add the calibri font but i don't know how i do this. somebody help me?
how to add fonts in TinyMCE ? i want to add the calibri font but i don't know how i do this. somebody help me?
Comments
I'm not sure off hand how to
I'm not sure off hand how to add fonts to TinyMCE, however you can't add non-standard fonts to the web - no one will be able to see the font unless they also have it installed. A quick google lookup shows this font only comes with Office 2007 for windows and Ofiice 2008 for mac. Anyone who doesn't have those (most people) will not see the font at all.
Here's an article on fonts that can be used on the web: http://www.sitepoint.com/article/eight-definitive-font-stacks/
And this shows the (unfortunately limited) number of "web safe" fonts: http://www.sitepoint.com/article/principles-beautiful-typography/2/
One of the special ways you can use non-standard fonts on the web is with sIFR. A Drupal module that supports this is http://drupal.org/project/render however this won't integrate with TinyMCE (I believe you use it in your theme).
Hope this helps.
-- David
davidnewkerk.com | absolutecross.com
View my Drupal lessons & guides
But ho i introuduce this?
this module don't works in my drupla installation because i'm using the 6 version and this module just work in 5 version. But it is possible add font in TinY module?
You can try the 6.x-1.x-dev
You can try the 6.x-1.x-dev version of Render module. Very often the dev version works. Also the module is nothing more than a UI for configuring the settings of sIFR right now, so you could also just use sIFR the normal way (as you would on any other website).
So far as TinyMCE... on a website you should never use the
<font>tag, which is deprecated in current web browsers/web standards (it still works, but not necessarily forever). Do not even enable the "fontselect – font" button in TinyMCE. The correct way would be to enable the "styleselect – font" button, and add font styles you want to make available in the editor to TinyMCE's "CSS classes" setting (at the very bottom of the settings page in the "CSS" category)... I only have an old version of TinyMCE so the options could be changed. You can then add a list of styles you want to make available (related to style classes you have in your CSS file) and it will then show just a list of those available styles. You will want to ensure that the<span>tag is permitted in your Filtered HTML.-- David
davidnewkerk.com | absolutecross.com
View my Drupal lessons & guides