Davide,

Thanks for responding!

On Fri, Jul 17, 2009 at 4:07 AM, Davide Cervone<d...@union.edu> wrote:
>
> It will not be as easy as you think to modify jsMath to use @font-face
> web fonts.
>
> First, IE uses EOT fonts, while everyone else uses TTF and OTF fonts
> (and DON'T handle EOT fonts).  Also, EOT fonts are keyed to a
> particular server, so they would have to be modified every time you
> want to serve them from a different server.

Seriously?  I guess I can see a sort of a security rationale for this,
or perhaps DRM... but I find it so strange that all this extra effort
went into what should have been obvious: use the fonts that the OS
already knows how to use.  *sigh*

OTOH, let's suppose we can work around that somehow -- I don't think
it should be a problem to detect IE and send it a different type of
file, right?

> I'm not sure of the
> implications of this for using them from a local disk (as no server is
> involved).

Actually, for a local notebook, there is certainly a server involved,
so this won't be a problem.

> Second, several browsers load web fonts asynchronously, meaning that
> they initially show the character in a default font and then change
> the page after the font is loaded.  Because jsMath must measure the
> size of parts of the mathematics while it is constructing the typeset
> formula, this approach will not work (the sizes would change after the
> math has ben typeset).  So you would need to work out a method of
> determining when the font is actually available and wait until after
> that to start typesetting mathematics.  The only ways I can think of
> to do this are fragile hacks.

Our use case isn't quite the same:  the page will load, and the font
will get cached, hopefully indefinitely.  So for the most part, a user
will see one badly-rendered page.  First impressions last, yes, but if
the user doesn't have a cookie set, we can warn them that they might
be looking at a poorly rendered version, click this button to
re-render.  That seems OK to me.

> I have been looking forward to being able to use web fonts with
> jsMath, but it is not a trivial change, and I'm not sure when I will
> get to it.

That you think this is nontrivial is a little discouraging for me...
but I have yet to read your code.  I'll crack it open and take a look,
at the very least.

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to