共用方式為


What is the Silverlight Font?

Saw this forum post, and thought it worthwhile to send out an FYI to the rest of the world:

In Silverlight 1.0, we use Lucida as the default font. For Silverlight 2 apps, we created a world-friendly font, called the Portable UI font (PUI!), which uses the Verdana glyphs for the Western characters and a variety of other glyphs for other languages.

Why? SL1 needed a web-friendly font. SL2 wanted to ship a font that looked great with our controls. The decision to use Lucida and Verdana depending on whether you host CLR was a compromise that I brokered between our designer, the text team, and the compat folks.

If you find yourself in a jam where you need to match the standard Silverlight 2 font, set the FontFamily to Verdana at the top of your application. If the characters are Western, we will use Verdana. If the characters are not supported by Verdana, it will fall back to our PUI.

(The issue in the linked post is a bug, we should detect that it is a Silverlight 2 app regradless of the extension. Let us know if you see any other variants of this bug, would love to hammer those out.)

Cheers, Seema

Comments

  • Anonymous
    November 25, 2008
    PingBack from http://blog.a-foton.ru/index.php/2008/11/26/what-is-the-silverlight-font/

  • Anonymous
    November 25, 2008
    Read this post for great inormation about Silverlight performance tips. Read this post for details about

  • Anonymous
    November 26, 2008
    The comment has been removed

  • Anonymous
    December 01, 2008
    Tim Heuer added my blog to the silverlight.net page, thanks for the heads up!

  • Anonymous
    January 15, 2009
    Read this post for great inormation about Silverlight performance tips. Read this post for details about

  • Anonymous
    October 20, 2010
    Silverlight chooses the font from the supported local fonts, from the fonts provided in a packaged file referenced in the FontFamily property, or from the stream-based zip or .ttf file passed to the FontSource property. The displayed result is the best match based on the values of the FontFamily, FontStretch, FontStyle, and FontWeight properties. <a href="www.eastcomfort.com/index.it.html">Alloggio Bucarest</a>

  • Anonymous
    May 10, 2011
    I take it this section of Silverlight 4s help is not quite up to date: Text and Fonts [...] Portable User Interface is a composite font. It uses several fonts to implement the range of international languages supported by Silverlight. This includes "Lucida Sans Unicode" and "Lucida Grande" for many Western writing systems, and many more for East Asian writing systems. [...] This contracticts what you wrote and presumably reflects Silverlight 1 better than Silverlight 4. (On a XP machine I tried it on, "Portable User Interface" looked like "Verdana", much like what your post suggested.) On a side note, it seems as if "Verdana" was less 'complete' than "Lucida Sans Unicode"; when using glyphs which are not supported by "Verdana", but are by "Lucida Sans Unicode", (eg. ≙∅⇑⇓⇐⇒ under XP) no automatic fallback seems to occur. Setting FontFamily="WhatEverFontILikeMoreThanVerdana,Portable User Interface,Lucida Sans Unicode" appears to help a lot.