locked
Embedded Fonts Don't Seem to Be Working RRS feed

  • Question

  • I the font manager, I have selected the Buxton Sketch font to be embedded in my Silverlight Sketchflow project. However, when I run the project or package the project and then upload it to the web server, the fonts do not display correctly.  In order to fix the problem, I have had to go to every (and I repeat EVERY) element and manually add FontFamily="Fonts/Fonts.zip#Buxton Sketch" to the XML.  

    I noticed that when I add a new element, there is no font information in its tag. Instead all I see is Style="{StaticResource TextBlock-Sketch}", so I still have to add the font tag myself.  I was able to do this relatively quickly using UltraEdit and doing mass search and replace in all of the xaml files.

    What do I need to do to get the fonts embedded automatically, so that I don't have to manually edit the XML?
    Wednesday, March 10, 2010 1:43 PM

Answers

  • Chuck helped me figure this one out...

    He had me change the project's sketchstyles.xaml file to look like this:

     <FontFamily x:Key="FontFamily-Sketch">Fonts/Fonts.zip#Buxton Sketch</FontFamily>

    Now it works. The other method he recommended was to remove the embedding, but I had trouble getting that to work.

    The best part of working out this problem is that it helped me get familiar with the various configuration files in a Sketchflow project.

    Thanks!

    Friday, March 19, 2010 12:05 PM

All replies

  • Okay question: in the blend properties panel if you select some of that text and look at the properties panel for it specifically the text properties is the Embed checkbox in the text properties of the blend panel checked. Also if you click on the text properties/font manager button it should show you in the project what is embedded in the project. For instance in that pop up do you see all glyphs checked??
    Don Burnett
    Friday, March 12, 2010 1:23 AM
  • Yes to both questions. The Embed checkbox is selected AND in the Font Manager window, "All Glyphs" is checked.

    If I drag a new Sketchflow style to the page here is what the XML looks like:

    <TextBlock HorizontalAlignment="Left" Margin="194,191,0,0" Style="{StaticResource TextBlock-Sketch}" VerticalAlignment="Top" Text="TextBlock" TextWrapping="Wrap"/>

    To get it to display the correct font at run time I have to add this:  FontFamily="Fonts/Fonts.zip#Buxton Sketch" 

    The resulting tag then looks like this and will work.

    <TextBlock HorizontalAlignment="Left" Margin="194,191,0,0" FontFamily="Fonts/Fonts.zip#Buxton Sketch" Style="{StaticResource TextBlock-Sketch}" VerticalAlignment="Top" Text="TextBlock" TextWrapping="Wrap"/>

    Otherwise, it displays the browser default font (I think) which is Arial or something similar.
    Monday, March 15, 2010 12:38 PM
  • Chuck helped me figure this one out...

    He had me change the project's sketchstyles.xaml file to look like this:

     <FontFamily x:Key="FontFamily-Sketch">Fonts/Fonts.zip#Buxton Sketch</FontFamily>

    Now it works. The other method he recommended was to remove the embedding, but I had trouble getting that to work.

    The best part of working out this problem is that it helped me get familiar with the various configuration files in a Sketchflow project.

    Thanks!

    Friday, March 19, 2010 12:05 PM