Re: Using Javascript to Detect Script Support in a Browser

From: Andrew Cunningham (lang.support@gmail.com)
Date: Fri Jun 18 2010 - 02:16:41 CDT

  • Next message: Otto Stolz: "Re: Latin Script"

    it is an issue that we've struggled with for a while

    eot, ttf font linking, woff and svg fonts all play a part in a
    possible solution.

    for my projects i also have to consider if clients are likely to be
    using older operating systems, and thus may not have rendering
    support.

    SO detecting if appropriate fonts are available, doesn't

    Keith Stribley used a similar approach, see
    http://www.thanlwinsoft.org/ThanLwinSoft/MyanmarUnicode/WebDevelopers/#detect

    For Myanmar he compared <U+1000 U+1000> to <U+1000 U+1039 U+1000>
    which not only allowed him to see if an appropriate font was a
    available, but whether appropriate rendering was occurring.

    On 17 June 2010 07:29, Ed Trager <ed.trager@gmail.com> wrote:
    > On Tue, Jun 15, 2010 at 5:52 PM, Marc Durdin

    >> Couldn't you do this just using font fallback in CSS, and just leave it to the user agent to sort out?  Two examples:
    >>
    >>  P { font-family: Code2000, MyCode2000; }
    >>  @font-face { font-family: MyCode2000; src: url('code2000.ttf'); }
    >>
    >> Or:
    >>
    >>  P { font-family: MyCode2000; }
    >>  @font-face { font-family: MyCode2000; src: local("Code2000"), url('code2000.ttf'); }
    >>
    >

    for the browsers that can handle src local() syntax.

    > I cannot conclusively say at this point whether my planned "dynamic"
    > solution is better than a more static "let the UA figure it out"
    > approach, but I'm going to try it and see how it goes.
    >

    both approaches have there benefits, really depends on what you are
    trying to achieve. But i suspect that the static solution is more
    scaleable.

    -- 
    Andrew Cunningham
    Senior Project Manager, Research and Development
    Vicnet
    State Library of Victoria
    Australia
    andrewc@vicnet.net.au
    lang.support@gmail.com
    


    This archive was generated by hypermail 2.1.5 : Fri Jun 18 2010 - 02:21:47 CDT