Description
Currently i'm working on a project that requires to have certain assets to be exchangeable, i.e. can be replaced by the user. For convenience everything is collected in different
ResourceDictionaries and merged within
ApplicationResources.
This works fine, except for
FontFamilies that aren't referenced via an
URI, i.e.
<Object UriSource="pack://siteoforigin:,,,/Path/To/Asset.ext" />
Already Tested
Working:
<FontFamily x:Key="fontMain">X:\Path\To\Asset\FontFile.ttf#FontName</FontFamily>
Not working:
<FontFamily x:Key="fontMain">./Assets/Fonts/FontFile.ttf#FontName</FontFamily>
<FontFamily x:Key="fontMain">./Assets/Fonts/#FontName</FontFamily>
<FontFamily x:Key="fontMain">/Assets/Fonts/FontFile.ttf#FontName</FontFamily>
<FontFamily x:Key="fontMain">/Assets/Fonts/#FontName</FontFamily>
<FontFamily x:Key="fontMain">/AssemblyName;component/Assets/Fonts/FontFile.ttf#FontName</FontFamily>
<FontFamily x:Key="fontMain">/AssemblyName;component/Assets/Fonts/#FontName</FontFamily>
Question
This part should be obvious, but i write it anyway.
What do i have to do, to make it work? Don't want to add them via code, they are needed for the GUI design. Otherwise this won't be an issue, right?
Bonus
This "Question" is also up on
StackOverflow[
^], so you can grab some Reputation there as well.