Add a font

Add a font

de către Chief Thomas-
Număr de răspunsuri: 34

How can I add a font to the HTML-Editor.

Which file should I change ??

Thank you in advance.

Chief

Atașament addafont.gif
Media aprecierilor: -
Ca răspuns la Chief Thomas

Re: Add a font

de către Janne Mikkonen-
You'll need to dug into file called htmlarea.php (/lib/editor/)

Go to line 164 (section this.fontname)

this.fontname = {
        "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'
    };

Add your line into the list. And remember to clear your browser cache to see the changes.

- Janne -
Media aprecierilor:Useful (1)
Ca răspuns la Janne Mikkonen

Re: Add a font

de către Anja Choon-

Dear Janne, thanks as well. I just changed it and it really worked! Would it be also possible to ad buttons or something else for inserting certain characters (for example when people would like to write umlauted vowels (ä, ë, ï, ö, ü) but only have an English keyboard)? Have a nice day, Anya

Ca răspuns la Anja Choon

Re: Add a font

de către Janne Mikkonen-
Hi Anja.

Could they use "Insert special character" -button? (after emoticons button).
Ca răspuns la Janne Mikkonen

Re: Add a font

de către Anja Choon-

Actually, that wouldn't do the whole job since I am using a special font that replaces umlauted vowels by subdotted ones etc. (http://moodle.org/mod/forum/discuss.php?d=6166).

I want them to be able to use those characters without too much hassle, meaning I don't want them to have to click on an umlauted o in order to get a subdoted o (that still sounds easy but in order to get a low-tone m you need to type +, for a doted n you need to type ß, for a step-tone subdotted i you need to type ³ etc.).

If there was for example a button that would either have a picture of a subdoted o on it or an umlauted one that shows up as a subdoted one (<font face="igbo">ö</font>), then that would be much better.

Ca răspuns la Anja Choon

Re: Add a font

de către Janne Mikkonen-
Ok! It can be done. But I don't think it'll not going to get into general release. Do you wish me to make them to you or do I provide instuctions how you can make them?

Fist I'll have to get some sleep (48 hours awake is just too much).
Ca răspuns la Janne Mikkonen

Re: Add a font

de către Anja Choon-

Yes, I see, it's even later at your place than here in the UK. There is no need to rush and you definetily should get some sleep.

If the instruction is going to be understandable by somebody who knows only little more than html, then I would like to get it. Otherwise, I don't know how much work it would be for you to make the buttons for me (I am quite tired as well, but I believe to remember that they would be 41 buttons!). If you shouldn't have the time to do it and I should not be able to understand your instruction, then I just will try to get some help from my friend again. Breites Grinsen

Sleep well, Anya

Ca răspuns la Anja Choon

Re: Add a font

de către W Page-
Hi Anja!

I eventually would like to converse in another language so I am very interested in your request. However, I see most of the characters for other languages (other than English) in the "Element" pop up window in the HTML editor. I do not however need to use it frequently.

Could you explain a bit more what it is you are looking for. It may help me (and probably others) if and when I begin to communicate in another language. This is not an urgent request. Just for my edification.

Also, I visited your web site but I could not locate the download link to download the "Igbo" fonts.  When I did a web search I saw many folks are charging  for the fonts.  Is there anywhere I could download the fonts for free?

WP1
Ca răspuns la W Page

Re: Add a font

de către Chief Thomas-

http://uwandiigbo.com/igbo.ttf

here is your download, WP1

Ca răspuns la Chief Thomas

Re: Add a font

de către W Page-
Hi Chief & Anja!

Chief, Thank you for the font.

Anja, Thank you for the language lesson and example.

I think I am going to attempt the lessons at the site.  This is so interesting.

WP1

Ca răspuns la W Page

Re: Add a font

de către Anja Choon-
Good Morning, WP1. That's how Igbo looks like. The passage does not contain all possibel combinations of diacritis and letters and it is missing the Naira symbol, but it should give you an idea of how it looks like. Greetings, Anya
Atașament igbo2.gif
Ca răspuns la Anja Choon

Re: Add a font

de către Ger Tielemans-
I was wondering, if you are using windows AND if you choose for keyboard setting "US international" AND for language your language, does it then not support key-combinations like it does here for Dutch? ë ç è é  
Ca răspuns la Ger Tielemans

Re: Add a font

de către Anja Choon-

Hello Ger! Sorry, I don't really know how that should help me. gemischt Maybe if you explain that, I would understand -and maybe not! Breites Grinsen Thanks for your answer anyway, Anya

PS: As far as I know, this option would not give me all the characters that I need.

Ca răspuns la Anja Choon

Re: Add a font

de către Janne Mikkonen-
Well the task just lift of to another atmosphere. And all these are available only in UTF8, so this is going to need a little bit more investigation.

Only site that I found that describe these letters was in french, so I couldn't get much out of it.
Ca răspuns la Janne Mikkonen

Re: Add a font

de către Anja Choon-
I am just working on some drafts how it could look like and I had an idea who to reduce the buttons but I don't know if it is going to work. I will post them in a short while (hopefully). Thanks for still wanting to help after discovering that it might be more work! See you, Anya
Ca răspuns la Anja Choon

Re: Add a font

de către Anja Choon-

I'll write a comment for the image now. Anya

Edit: Or maybe I have a look at the other suggestions first! Breites Grinsen

Atașament drafts.jpg
Ca răspuns la Anja Choon

Re: Add a font

de către Ger Tielemans-

The way you describe it, looks like the way we do it in Dutch (ë è é ç ê ã ) under WINDOWS with the keyboard in the us-international setting, but that does not help you to control it on the web. Then...


http://www.unicode.org/

MMM, I do not see them as a set in the list: http://www.unicode.org/standard/supported.html

But neither on the impossible list: http://www.unicode.org/standard/unsupported.html 

So you have to harvest them one by one here: http://www.unicode.org/charts/normalization/

OR, maybe you need to study and act: http://www.unicode.org/pending/proposals.html

Ca răspuns la Chief Thomas

Re: Add a font

de către Janne Mikkonen-
This is extension to http://moodle.org/mod/forum/discuss.php?d=6167#28656

Okey, here is how it can be made:

  1. Create buttons sizes 18x18 px, color depth 2 bit (black and white), set white transparent.
  2. Save images to folder /lib/editor/images
  3. Add buttons to toolbar: (find section this.toolbar in htmlarea.php, row 148) and add new row to the toolbar:
  4. create a function that actually inserts selected character:
    Paste this function right under HTMLArea._insertChar function (row 1615).
  5. Next we need to add some actions to those buttons, so find section this.btnList (row 217) and add lines:
    _insertSpecial takes one argument and it's the character which is going to be inserted. Every button needs its own function call.
  6. Now it's ready to rock! Empty your browser cache and try it on.
WORD OF CAUTION:
  1. Make a backup of your original htmlarea.php -file.
  2. Every client needs igbo.ttf font or outcome might be somewhat interesting.

Media aprecierilor:Useful (1)
Ca răspuns la Janne Mikkonen

Re: Add a font

de către Anja Choon-
Hello Janne, I can't really answer to that one right now. First I have to spend about an eternity reading it. winken Nevertheless, I wanted to thank you already, and I will inform you about the outcome (just don't expect it soon!). Thanks a lot, Anya
Ca răspuns la Anja Choon

I finally got it!!!

de către Anja Choon-

... and the whole time there has been just one comma too much! Breites Grinsen Thanks again, Anya

Ca răspuns la Anja Choon

Re: Add a font

de către Anja Choon-

Hi Janne, our instructor Ejike Eze just has seen this new keyboard. He is very excited about it though three letters are still not working. I should forward his gratitude to you.

About the three characters that are still missing:

Can it be that some characters can not be inserted? I think the following didn't work because of the characters that were to be inserted:

  insertchartwentyeight: [ "Insert char", "28.gif", false, function(e) {e._insertSpecial(''');} ],

  insertcharthirtynine: [ "Insert char", "39.gif", false, function(e) {e._insertSpecial('\');} ],

  insertcharfortyone: [ "Insert char", "41.gif", false, function(e) {e._insertSpecial('@');} ]

When I replace ', \ and @ with numbers it works (besides that the buttons now insert numbers of course).

I meele (thanks in Igbo), Anya

Ca răspuns la Anja Choon

Re: Add a font

de către W Page-
Hi Chief and Anja!

I looked at the font  that I downloaded but I did not see any letters with dots under them.  Could it be I do not know how to use the font correctly so I can get these letters to type out?

Need your help with this.

WP1

Ca răspuns la W Page

Re: Add a font

de către Anja Choon-

Hi WP1! In order to get the subdoted vowels you have to type in the umlauted ones (but only ä/ ï , ö and ü) but I assume that your keyboard does not have umlauts. You can copy and paste the umlauts I gave you. How to type the rest of it is shown in the following posting: http://moodle.org/mod/forum/discuss.php?d=6167#28656. You have to compare the two first tables and see which character has to be used in order to produce which Igbo character. I hope this helps. It's nice hearing that you still are interested in it. lächelnd See ya! Anya

Ca răspuns la Anja Choon

Re: Add a font

de către W Page-
Hi Anja,

I am finding this a bit confusing but I will continue to try.  Is it  "OK" to email you directly if I continue to have problems with this?

WP1

Ca răspuns la Anja Choon

Re: Add a font

de către Janne Mikkonen-
' and \ are special characters, so they'll need to be escaped like ' and \ .

@ character is a different story it self, when you paste this char into editor it assumes we are making a mailto: -hyperlink, so I do not know how to pass this problem.

ps. You could try replace @ sign with iso entity &#64;
Ca răspuns la Janne Mikkonen

Re: Add a font

de către Anja Choon-

After using iso entities that you gave me it is working completely but I had to replace not only the @. When I had done this, there were still three missing letters (I didn't notice yesterday that & hadn't work either). Therefore I replaced them as well and then it worked. <quote whom="myself">Thanks</quote> winken, Anya

PS: In case you want to have a look at it, I created a user for you using your usual username and password for testing purposes. I will delete it again after the week-end. http://uwandiigbo.com/moodle2/moodle/

Ca răspuns la Janne Mikkonen

Re: Add a font

de către Jordi Prats-
I've followed the instructions but it does not intsert any char. Maybe it have changed since March 2004?

Nowadays what should do to do the same? I'm using the latest version (1.5.3)

Thank you all

(I've attached my modified version)