11
RiazShahid
Re: Adding new font to Mastop Publish 1.1

Thanks a lot ghia!
I have modified "english.php" file in
/class/xoopseditor/tinymce/language/

I added the new font names required, uploaded and replaced the said file on server. But on website its still same as before with no change and its not showing the names of newly added fonts.
My "Check templates for modifications ?" is already "ON"
Any suggestion please......

12
redheadedrod
Re: Adding new font to Mastop Publish 1.1

I am making an assumption here based on general knowledge and not specific knowledge with Publish. When web applications make use of fonts they are using the fonts already installed on your computer. In most cases the primary font to use is selected but there are always backup fonts as well. If the fonts asked for in the application are not available the browser will default to its normal font. Chances are that the fonts listed as available are very common fonts. If you want to use another font it will only be available to those that have loaded it onto their computer.

Make sense? As was already mentioned, if someone doesn't have the font you are using it will fall back to one that is on the computer in an order selected by the application first then as a final fallback whatever the browser has as its default font.

So if you want people to use your rare font they will have to download and install it on their computer to see it.

Rodney

13
RiazShahid
Re: Adding new font to Mastop Publish 1.1

Hello redheadedrod!
Yes of course and I well understood it. But its even not showing for me, so that's the issue. For new users I will ask them to install that font and that's not too much rare, its a unicode font and in our country a lot of people already have it installed.
In any sense I have installed it in my PC and I see this font on other forum websites, but its not being shown in my xoops website, though I edited the above said file.

14
redheadedrod
Re: Adding new font to Mastop Publish 1.1

Make sure your browser also knows about it.. I have not personally tried using new fonts in the browser but you might need to do something to make the browser see the font as well? Not sure.


15
RiazShahid
Re: Adding new font to Mastop Publish 1.1

Well, browser already knows it, as I can see this font on other websites.

16
RiazShahid
Re: Adding new font to Mastop Publish 1.1

any suggestion from Mamba or ghia?

17
ghia
Re: Adding new font to Mastop Publish 1.1
  • 2010/12/16 13:26

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


What changes did you exactly make?

18
RiazShahid
Re: Adding new font to Mastop Publish 1.1

In /class/xoopseditor/tinymce/language/english.php file
I added following font names
Quote:

// FONT LIST, FORMAT: "Name=value1,value2;Name=value"
define("_XOOPS_EDITOR_TINYMCE_FONTS", "Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial, Jameel Noori Nastaleeq, Nafees Web Naskh,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings");
?>


The new fonts I want to add are Jameel Noori Nastaleeq, Nafees Web Naskh, but these are not being shown in the list of available fonts.

19
redheadedrod
Re: Adding new font to Mastop Publish 1.1

I am sure ghia or someone else will comment if I am wrong but it appears that the file you have modified is a series of lists...

First choice is...

Arial=arial,helvetica,sans-serif

This offers the choice of Arial and will USE arial if it is available. If it is not available the first fall back is helvetica and the second fall back is sans-serif.

By fall back that means if the first one is not available it will use the first fall back and if that one is not available it will use the second fall back on down the line until it finds a font you have or it will fall back to the browser...

So in the portion that reads...

Courier New=courier new,courier,monospace

The choice of Courier New will actually use the Courier new font if available then if not available will use courier font and lastly if that is not available will use the monospace font.

So lets look at the line you entered...

Tahoma=tahoma,arial, Jameel Noori Nastaleeq, Nafees Web Naskh,helvetica,sans-serif

This line will mention the choice "Tahoma" and if the tahoma font is available it will use it first.. If not then it will use arial, if not it will then use jameel noori nastaleeq, if thats not available then Nafees Web Naskh and lastly if NONE of those are available it will default to sans-serif...

If you WANT to offer Jameel Noori Nastaleeq as a choice you will need a line that reads something like...

Jameel Noori Nastaleeq = Jameel Noori Nastaleeq, arial, sans-serif;

And another line like
Nafees Web Naskh = Nafees Web Naskh, arial, sans-serif;

This should offer the two options as fonts and then if those are not available they will fall back to arial and if that is not available it will choose sans-serif.

20
RiazShahid
Re: Adding new font to Mastop Publish 1.1

redheadedrod........ you are absolutely right and thanks a lot for writing in detail.
Now I can copy/paste text from MS word using this font and its appearing on the web as well. So the actual work required has been done, though it is still not being shown in the drop down menu of the editor (in the list of font). Now did the following modification, I still made any mistake? I just copied the lines you wrote in previous thread.
Quote:

// FONT LIST, FORMAT: "Name=value1,value2;Name=value"
define("_XOOPS_EDITOR_TINYMCE_FONTS", "Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Jameel Noori Nastaleeq = Jameel Noori Nastaleeq, arial, sans-serif; Nafees Web Naskh = Nafees Web Naskh, arial, sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings");
?>

Login

Who's Online

320 user(s) are online (252 user(s) are browsing Support Forums)


Members: 0


Guests: 320


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits