Roadblock in the way of migrating the proof-of-concept Silverlight XPS reader [SimpleSilverlightXpsViewer sample does not work on Silverlight 2 RTW]
**
This blog has moved to a new location and comments have been disabled.
All old posts, new posts, and comments can be found on The blog of dlaa.me.
See you there!
Comments
Anonymous
October 19, 2008
In this issue: Shawn Wildermuth, Laurence Moroney, Dave Relyea, Mike Taulty, Andy Beaulieu, Brad AbramsAnonymous
October 30, 2008
Silverlight 2 can still load fonts from Isolated Storage, right? Can you expand the fonts in embeded XPS into the isolated storage before loading them?Anonymous
October 30, 2008
Sorry, my comemnts was incorrect. I cannot load fonts from isolated storage with FontUri.Anonymous
October 30, 2008
silverlightkb, I've not considered the IsolatedStorage angle, but I think may boil down to the same thing as the following exchange I had with someone else (paraphrased slightly): Them: Note that you can download a font via WebClient or whatever and set it from code, it's just that it won't be downloaded automatically by the runtime. Me: So how would that work? Are you suggesting the FontSource constructor that takes a Stream? I think I considered this briefly and then dismissed it when I saw that only TextBlock, TextBox, and PasswordBox use FontSource (per Reflector). The Glyphs class does not - and I think that still leaves me up a creek. Did you have something else in mind? Them: Darn.Anonymous
October 30, 2008
silverlightkb, It looks like our replies crossed paths. But it seems we came to the same conclusion. :( Thank you very much for the idea - every bit helps!Anonymous
November 23, 2008
Fix for Simple XPS Silverlight Viewer for Silverlight 2Anonymous
November 23, 2008
Delay, I found a way to make it work (though not ideal). The fix is to package all the fonts in a separate XAP and load it dynamically. See my blog entry http://www.dotneteer.com/Weblog/post/2008/11/Fix-for-Simple-XPS-Silverlight-Viewer-for-Silverlight-2.aspx.Anonymous
November 23, 2008
silverlightkb, Congratulations on your creative solution! :) I think what you've done is a great approach for controlled scenarios because it's more flexible than alternative proposals that require fonts to be embedded directly in the viewer application itself. However, as I note above, I'm still hoping to be able to achieve the goal of a stand-alone viewer that works on unmodified XAP files (and avoids points 1 and 2 in your post) - but until then, yours is a very nice step in the right direction! Thanks!!Anonymous
April 20, 2009
I’ve recently been involved on a project that has a requirement to create and view XPS documents in Silverlight. Anonymous
August 05, 2009
Could you use SL3 local font support to avoid the font packaging. http://cid-289eaf995528b9fd.skydrive.live.com/self.aspx/Public/localfont.zipAnonymous
August 05, 2009
slyi, I'm not sure that you could. (FYI, I don't know what your attachment is and I didn't download it.) Specifically, an XPS file can contain ANY font in the world and you'd really like for that font to be used when rendering the relevant portions of the document. Because there's no guarantee that random font exists on the local machine, I'm not sure that local fonts solve the entire problem - though I agree they seem to improve the situation!