Skip to main content
Home Forums General Silverlight Hosting and Streaming Rename xap to zip causes font troubles
11 replies. Latest Post by haagel on March 24, 2009.
(0)
haagel
Member
97 points
98 Posts
11-12-2008 9:51 AM |
Since my web server doesn't support xap (it doesn't have the right MIME) I'm renaming my .xap to .zip. This works as far as the application shows up and is functional.BUT the fonts is screwed up! All text is enlarged which messed up my design. Why is this happening? Have anyone else had this problem?
IanBlack...
Contributor
2333 points
371 Posts
11-12-2008 10:23 AM |
Are you embedding the fonts or using the built in ones?
11-13-2008 3:15 AM |
I'm using the built in ones. Actually, I'm not even specifying any font information so it's the default that is being used.
11-13-2008 3:36 AM |
That's strange - do you have a public url you could post so I can see if the problem replicates on my machine?
shamrat231
4677 points
595 Posts
11-13-2008 3:56 AM |
Could you share the xap file[original] which extension is intact. I want to check in my pc, hosting on silverlight.live.com to see if the problem replicates itself.
If this post was helpful then please 'Mark as Answer'
Sharker Khaleed MahmudSr. Software Engineer(MCP,MCTS,MCPD[web])
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
11-13-2008 4:10 AM |
I've created a webpage that shows the problem. I've also included a link to the sourcecode on the page.
http://webfiles.haagel.se/xaptozip/
The page contains two silverlight applications. It is actually two copies of the same xap, one of which is renamed to .zip. The application only contains a TextBlock and a Button, both with some text on. If you experience the same problem as I do, the text will be notably larger in the version renamed to .zip.
11-13-2008 4:49 AM |
haagel: If you experience the same problem as I do, the text will be notably larger in the version renamed to .zip.
If you experience the same problem as I do, the text will be notably larger in the version renamed to .zip.
I am seeing exactly the same as you, but I don't have an explanation I'm afraid. The Silverlight run-time must process zip's differently from xap's I guess.
I did try UseLayoutRounding="True" on the elements but this did not change this situation.
I have sent an email to Seema Ramchandani (http://blogs.msdn.com/seema/) who I think would be the person to know the answer to this. If I get a reply I'll post it here.
seemar
128 points
39 Posts
11-13-2008 11:19 AM |
Hello,
it looks like you are running into our code which triggers the 1.0 font (for backwards compat) vs. the 2.0 font (designer approved for our controls) and the fontsize based on whether the extension is a xap. The font for 2.0 applications is a special Portable UI font, which is able to handle many different languages.
If your app is just English, you can use Verdana and maybe 10pt (I forget the size). The 1.0 font is Trebuchet. For multi-language apps, I'm waiting to hear how one can set our PUI as the font as a 2nd party.
-Seema, http://blogs.msdn.com/seema
11-14-2008 1:50 PM |
for multi-language apps:
Use Verdana, the PUI will be the fallback font for any chars that Verdana does not support..
11-15-2008 11:02 AM |
Thanks Seema!
StefanWick
2864 points
438 Posts
03-24-2009 10:24 AM |
Just to close the loop on the original issue: it is fixed in the Silverlight 3 code base. Check out the SL3 Beta here:
http://silverlight.net/getstarted/silverlight3/default.aspx
Thanks, Stefan Wick
03-24-2009 4:10 PM |
Good to know! Thanks! :)