开发者

Loading Fonts for Glyphs in Silverlight

开发者_JS百科Is it possible to load a font at runtime in Silverlight for the Glyphs object. I've tried all sorts

-I've set the fonturi to a web location at runtime - no joy

-I've tried the same approach as textblock etc by setting the source to a stream but Glyphs do not support this.

-I've googled forever on it, but it seems that the only way is to have the fonts marked as resources in your SL project - which means rebuilding the xap everytime you need a new font - or knowing the list of fonts you need at design time.

So the question really is...Does anyone know how to truly dynamically load fonts for Glyphs in Silverlight?


My friend discovered that FontSource property is the key point. Also setting FontRenderingEmSize and Fill properties is essential step to success. FontSource allows loading both remote and embedded TTF fonts by providing a stream.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜