Undefined glyphs characters

Sep 21, 2011 at 5:51 PM

 

Hi All,

I have two xps files if I load any of them, the file views correctly but if I load the two files sequentially, the second file loads with undefined glyph characters (appears as rectangles instead of text).

 

I think there is a problem with freeing font resources after loading the first file and the following code causes the problem:

                var glyphs = uiElement as Glyphs;
                if (glyphs != null)
                {
                    var stream = Application.GetResourceStream(_streamResourceInfo, ConvertPartName(glyphs.FontUri.ToString())).Stream;
                    glyphs.FontSource = new FontSource(stream);   // If we remove this line, the second file will load correctly and will not be affected by loading first file
                    zIndex++;
                    glyphs.SetValue(Canvas.ZIndexProperty, zIndex);
                }

 

The following are two files:

1- First file: Color.xps

http://www.mediafire.com/file/zdk23xh41dd902x/Color.xps

2- second file: Bullets.xps

http://www.mediafire.com/file/9f8ov2t6hj0xk2n/Bullets.xps

 

Can anyone help, pleeeeeeeease?

Thanks,

Hmeidi

 

Jun 27, 2014 at 10:16 AM
hi
did you solve your problem?
regards
venkat