Opened 15 years ago

Closed 15 years ago

#211 closed defect (worksforme)

New font ?

Reported by: PoeuffF Owned by: gogo
Priority: normal Milestone:
Component: Xinha Core Version:
Severity: normal Keywords: font
Cc:

Description

I'd like to add some font in my editor but it doesn't work for any font.

this.fontname = {

"— font —": ,
"Arial": 'arial,helvetica,sans-serif',
"Courier New": 'courier new,courier,monospace',
"Georgia": 'georgia,times new roman,times,serif',
"Tahoma": 'tahoma,arial,helvetica,sans-serif',
"Times New Roman": 'times new roman,times,serif',
"Verdana": 'verdana,arial,helvetica,sans-serif',
"impact": 'impact',
"WingDings?": 'wingdings'

};

does it exist a link where i can find all the police and the value to assign in order to insert them in my editor ?

Change History (10)

comment:1 Changed 15 years ago by niko

use something like

editor.config.fontname = {
    "— font —":         '',
    "Arial":	   'arial,helvetica,sans-serif',
    "Courier New":	   'courier new,courier,monospace',
    "Georgia":	   'georgia,times new roman,times,serif',
    "Tahoma":	   'tahoma,arial,helvetica,sans-serif',
    "Times New Roman": 'times new roman,times,serif',
    "Verdana":	   'verdana,arial,helvetica,sans-serif',
    "impact":	   'impact',
    "WingDings":	   'wingdings'
  };

to define your fonts.

don't change anything in htmlarea.js - as you would like to upgrade later to a new version of xinha...

comment:2 Changed 15 years ago by PoeuffF

yes i know it's like that in my xinha's version but how to add another font ? do you have an example ?

thx

comment:3 Changed 15 years ago by niko

i don't have an example, but like this it should work:

editor.config.fontname = {
    "— font —":         '',
    "Special-Font":       'specialfont'
  };

post your code!

comment:4 Changed 15 years ago by PoeuffF

if i'd like to add the Palatino's font, for example :

i've tried this, but it doesn't work :

editor.config.fontname = {
    // ...
    "Palatino" : 'palatino'
};

i've another problem : when i select a font like Verdana(for example), the caracters are modified but instead of writting Verdana for the selected font, he write another font : impact

comment:5 Changed 15 years ago by niko

in general it is a bad idea to use a non-standard-special as no uses will have it installed.

What does the code look like xinha generates when you change the font? please post that too :D

comment:6 Changed 15 years ago by anonymous

my code is simple :

htmlarea.js

    this.fontname = {
        "— police —":         '',
        "Arial":       'arial,helvetica,sans-serif',
        "Courier New":         'courier new,courier,monospace',
        "Georgia":     'georgia,times new roman,times,serif',
        "Tahoma":      'tahoma,arial,helvetica,sans-serif',
        "Times New Roman": 'times new roman,times,serif',
        "Verdana":     'verdana,arial,helvetica,sans-serif',
        "impact":      'impact',
        "WingDings":           'wingdings'
    };

when i change the font, the text appear with the font selected but instead of the font i've selected, "impact" is wrote on the font button. Why ?

I've try on your example's page and it's the same problem.

I'm searching for the solution..

comment:7 Changed 15 years ago by gogo

Which version of Xinha are you using, I suspect you are using the "stable" version, please use the nightly. I really must kill off that stable version, it's pointless.

comment:8 Changed 15 years ago by anonymous

I'm using the latest version ("stable") because i install xinha in a company which wants a stable editor wysiwyg.

Do you really think, that i will update to the nightly version ?

comment:9 Changed 15 years ago by gogo

stable is quite old, nightly is what is being developed nd is stable enough for most uses (it's better than the "stable" release probably).

Xinha is not yet at a true stable release.

Please see if you stil have the problem with the nightly, and report back here.

comment:10 Changed 15 years ago by gogo

  • Resolution set to worksforme
  • Status changed from new to closed

Closing this, I think usig nightly would fix it. I've removed stable releases from examples and downloads for now.

Note: See TracTickets for help on using tickets.