I need my WPF app to use a true-type font for a different language. I have the font located in a folder called 'fonts' inside the project. The font I'm using is available for free download here
Since the font is installed in my system i first tried
FontFamily="FMBasuru"
I've read the post here and tried doing (this is the exact markup I'm using including font name)
<Window.Resources>
<Style x:Key="SinhalaFont">
<Setter Property="TextElement.FontFamily" Value="fonts/#FMBasuru"/>
</Style>
</Window.Resources>
...
<TextBlock Style="{DynamicResource SinhalaFont}">r</TextBlock>
...
I made sure that I'm using the correct font name instead of the font filename.
What could have I got wrong?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…