https://bugzilla.wikimedia.org/show_bug.cgi?id=38122
--- Comment #3 from Santhosh Thottingal <[email protected]> 2012-07-22 08:47:22 UTC --- (In reply to comment #2) > 1. Create http://hi.wikipedia.org/wiki/User:Brion_VIBBER/common.css with the > following: > > .miriam-clm { font-family: 'Miriam CLM'; } > > 2. Visit a random edit-page, enter this wiki-text, and click "Preview" (or > "पूर्वावलोकन" if you haven't set your language preferences): > > * <span class="miriam-clm">עִבְרִית</span> > * <span lang="he">עִבְרִית</span> > > You will notice that the two list-items look identical, because Miriam CLM > is successfully loaded, and applied to both list-items. Explanation: WebFonts extension parse the page and find an element with lang=he, loads the default font for he= Miriam CLM. Since the font is loaded the .miriam-clm { font-family: 'Miriam CLM'; } works fine and <span class="miriam-clm">עִבְרִית</span> correctly change the font. > 3. Now try this: > > * <span class="miriam-clm">עִבְרִית</span> > * <span style="font-family: 'Miriam CLM'">עִבְרִית</span> > > Same story. Explanation: WebFonts extension parse the page and find an element with style with font-family: 'Miriam CLM'. It loads the font Miriam CLM. Since the font is loaded the .miriam-clm { font-family: 'Miriam CLM'; } works fine and <span class="miriam-clm">עִבְרִית</span> correctly change the font. > 4. But if you try just this: > > * <span class="miriam-clm">עִבְרִית</span> > > then Miriam CLM does *not* get loaded. Explanation: In this case , font is defined in a CSS file, and no where in page HTML or in inline CSS. WebFonts extension does not parse the external CSS. It parses the HTML elements and it also identify the inline font-family style attribute(like <span style="font-family: 'Miriam CLM'">עִבְרִית</span> ) . But since it does not parse common.css and load the font-family defined in that external css, the case #4 does not work. I am not sure whether we can support this, we did not try so far. In en.wikisource, hebrew fonts are loaded using templates . A very detailed explanation of this templates and how they use webfonts extension are available here: http://en.wikisource.org/wiki/Template:Lang and http://en.wikisource.org/wiki/Template:Lang-hbo Please let us know if your usecase is not achievable in this way. Thanks. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
