Firefox is unable to display kannada fonts in Kannadakasturi.com. I don't know why it is so...,
When i want some meanings for some Kannada words, Those Kannada words are not displayed in the website-kannadakasturi.com. I don't know why Firefox has failed in displaying the Kannada fonts
URL of affected sites
http://www.kannadakasturi.com/kasturiDictionary/Searchword.asp
All Replies (5)
Try to install the "BRH Kannada" font: http://www.totalkannada.com/GetKannadaFonts.asp
I had the same problem from Firefox 6.x to Firefox 9.x. IMHO, there are two problems for this issue.
1. The HTML code in kannadakasturi.com website uses "BRH Kannada" fonts, but their website has download links for "BRH AmeriKannada" fonts on their website. I believe this is a problem. Because of this problem, even the main page on their website is not displayed correctly inspite of installing font from their website. You can download the correct "BRH Kannada" font from here http://www.fontineed.com/font/BRH_Kannada, for example. This will fix the problem of main page rendering incorrectly.
2. Then, there is a second problem that is specific to Firefox. Because of this second problem, the dictionary search results are displayed incorrectly. I had done some research on this problem and what I found is that the dictionary entries and meaning pages on that website have the following stylesheet rule:
@font-face {
font-family: BRH Kannada;
font-style: normal;
font-weight: normal;
src: url(BRHKANN0.eot);
}
This seems to be causing the problem. If I remove this rule, it renders kannada fonts correctly in Firefox 6.x to Firefox 9.x. Seems like Epic 1.2/Mozilla 3.6.10 handles this stylesheet declaration correctly and kannada fonts are displayed correctly. I don't understand why Firefox is not able to handle this CSS rule.
Also, the website's main page's HTML code does not have this stlyesheet rule, which is why, I guess, the main page is rendered correctly. Seems like all text where Kannada text is shown do have the correct <font face="BRH Kannada"> HTML code.
I tried to contact the kannadakasturi webmaster to get this fixed, but to no avail. So, I decided to fix it on the client side, in the browser. So, to fix this problem, install Greasemonkey Firefox add-in. Then, copy and paste following JavaScript, without BEGIN and END words, into some .user.js file (for example, into a RemoveBRHKannada.user.js file). Then, drag and drop that .user.js file into the Firefox browser. That will fix the problem. Now, try going to the kannadakasturi website again.
I have been using this fix for about an year now. This script basically removes the above CSS rule from all webpages from just the kannadakasturi website, everytime. It will not affect other websites.
Of course, you should have installed the BRHKannada font from the kannadakasturi website per their instructions in first place.
BEGIN
// ==UserScript==
// @name Remove BRHKannada
// @namespace http://www.webmonkey.com
// @description Removes CSSStyleSheet element that defines "font-family: BRH Kannada".
// @include http://www.kannadakasturi.com/*
// ==/UserScript==
function removeBRHKannadaFontFamily() {
var rulePattern=/font-family:.*BRH.*Kannada/i; var ccs_Rules; var currSheet; for (i=0; i < document.styleSheets.length; i++) { currSheet = document.styleSheets[i]; css_Rules = currSheet.cssRules; for (j=0; j < css_Rules.length; j++) { if (rulePattern.test(css_Rules[j].cssText) == true) { currSheet.deleteRule(j); } } }
}
removeBRHKannadaFontFamily();
END
</font>
Modified
You need to add a local rule to the @font-face section to make Firefox use a locally installed font.
src: local("BRH Kannada"), url(BRHKANN0.eot);
- bug 637157 - @font-face family names should hide system fonts
Modified
Thanks for pointing to appropriate links related to this issue and for suggesting to use local rule to the @font-face section. Now I know the reason why it doesn't work in Firefox.
Unless the webmaster changes the code on the server side, we are stuck with having to use Greasemonkey script to either remove the offending @font-face altogether or to modify it to use local rule.
You're welcome
The only other way to make it work is to disable downloadable fonts by setting the gfx.downloadable_fonts.enabled pref (temporarily) to false. That will disable the @font-face rule and allows the font-family rules for other elements to work with the locally installed font.