1
votes

I'm using Visual Studio 2010. I want to build an application displaying some text with custom fonts. All the fonts are TrueType fonts, with the editable attribute, and are declared as resource with "Copy Always". But, even at design time, some fonts are replaced by the standard Silverlight font, in the XAML editor. For example I have 14 different versions of the Helvetica font (bold, oblique, italic, narrow, condensed... and mix of those). But only 3 are correctly displayed, others are using the fallback font. If I open the ttf files with the windows font preview application everything looks ok.

Any idea of what can be wrong ?

Thanks for your help.

1
Do a quick solution search for "</FontFamily>" and find the places in your resource dictionaries where the defaults are declared, then change them to your liking.Chris W.
Sorry I don't understand. I want to use the custom fonts in a few places, but I want to keep the default font for most of the texts.user2223898
Then just do FontFamily="blah" on the ones you want to change.Chris W.

1 Answers

0
votes

After two months of hair pulling I've finally come with a simple solution : Don't use - (dash) in your embedded font names

I hope it can help somebody.