C
C#2y ago
4ngel_._

❔ ✅ Custom Fonts Not Working [ Visual Studio - WPF ]

Custom Fonts are not working. I wonder what causes the issue.
12 Replies
4ngel_._
4ngel_._OP2y ago
Here is the screenshots.
4ngel_._
4ngel_._OP2y ago
4ngel_._
4ngel_._OP2y ago
Solved
Klarth
Klarth2y ago
You shouldn't reference by file name.
4ngel_._
4ngel_._OP2y ago
?
Klarth
Klarth2y ago
<FontFamily x:Key="JetBrainsMono">pack://application:,,,/WpfApp19;component/Fonts/#JetBrains Mono</FontFamily> is one way to do it
4ngel_._
4ngel_._OP2y ago
mhm
Klarth
Klarth2y ago
Need to make sure you build the font as a Resource.
4ngel_._
4ngel_._OP2y ago
Oh okay. Thanks
Klarth
Klarth2y ago
Then either style or use as:
<TextBlock FontFamily="{StaticResource JetBrainsMono}" FontSize="72">
JetBrains<LineBreak />
Mono.<LineBreak />
A typeface<LineBreak />
for developers_</TextBlock>
<TextBlock FontFamily="{StaticResource JetBrainsMono}" FontSize="72">
JetBrains<LineBreak />
Mono.<LineBreak />
A typeface<LineBreak />
for developers_</TextBlock>
4ngel_._
4ngel_._OP2y ago
Got it. Thank you!
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server