Amir E. Aharoni wrote:
> I am proofreading Gesenius' Hebrew Grammar [1] on the English Wikisource.
> 
> It uses intricate formatting and for proper display of Biblical Hebrew it
> needs a font which isn't installed on most people's computers. Fortunately,
> this font, called Ezra SIL SR, is Free Software, released under the Open
> Font License.[2]
> 
> Some modern browsers, such as Firefox 3.5 are able to render downloadable
> fonts in a way that is consistent with draft CSS 3 standard. Would it be
> possible to upload such a free font to Wikimedia servers and let people who
> use modern browsers, but don't have the font on their computer, enjoy the
> book with proper fonts without bothering with installing new fonts?

That'd be spiffy! :) A couple notes...


On the web & wiki end:

https://developer.mozilla.org/en/CSS/%40font-face

It's not clear to me when fonts referenced in a @font-face get loaded; 
whether they'll always load when referenced in a style sheet, or only 
when something actually uses a style that requires them.

In particular for fonts that will only be used on some pages rather than 
on a whole site, we don't want to force people to be downloading fonts 
they're not using.

We should confirm what the behavior is with Firefox 3.5, Safari 3.1/4.0, 
and Opera 10 betas; unless they're very smart about only loading what 
they need, we'll probably need to devise an extension to import 
particular fonts for a given page.


We'll also need to write some quick code to do basic validation on .ttf 
and .otf files at upload time. (Bonus points for metadata extraction; 
many font files will contain copyright metadata, which among other 
things will make it easier to identify copyvio uploads of fonts without 
permission.)


On the upload server end:

Gecko browsers (Firefox 3.5 and related browsers supporting the new 
@font-face support) by default apply same-origin restrictions to fonts, 
meaning they have to be hosted on the same domain as the web page.

To support files uploaded to upload.wikimedia.org we'd need to poke 
about with access controls:
https://developer.mozilla.org/En/HTTP_access_control

The simplest should be to add this HTTP header to .ttf files:
Access-Control-Allow-Origin: *

We'll also want to configure the media web servers to send .ttf files 
gzipped, as this can lead to significant savings. (In the case of the 
Ezra font that Amir mentioned, this takes transfer size down from 152k 
to 59k.)


And of course there's the Internet Explorer question. :)

IE currently only supports the EOT "embedded" font format, and won't 
accept regular TrueType or OpenType font files. If there are free 
software tools for creating an EOT from a TTF or OTF which we could use 
to automate this, that would be quite nice. Otherwise it'll remain a 
progressive enhancement for standards-compliant browsers, and IE users 
will have to download the fonts manually.

-- brion

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to