View Issue Details

IDProjectCategoryView StatusLast Update
0004319NoesisGUIStudiopublic2025-07-28 16:22
Reporterdstewart Assigned Tosfernandez  
PrioritynormalSeveritymajor 
Status resolvedResolutionfixed 
Product VersionStudio_Beta 
Target VersionStudio_BetaFixed in VersionStudio_Beta 
Summary0004319: Fonts Added As A Resource To a Non-GlobalResource Dictionary Generate Incorrect XAML Syntax
Description

Currently, if a Font is added as a Resource to GlobalResources.xaml, the xaml produced follows an expected syntax of:

<ResourceDictionary
<FontFamily x:Key="MyFontResource">Fonts/#Super Fortrees</FontFamily>
</ResourceDictionary>

However, if a Font is added as a Resource to a 'Standalone' Resource Dictionary, the following syntax is generated:

<ResourceDictionary
<FontFamily x:Key="MyFontResource">studio:///MyProjectName;component/Fonts/#Super
</ResourceDictionary>

Where this second example becomes problematic, and the reason for making as 'Major' is that this syntax, the Engine would be unable to access this location due to the studio:// portion of the path.

Note that quite interestingly, the incorrect syntax only seems to generate with Fonts. Bitmap Assets for example, generated 'as expected' XAML.


Repro Steps:

1) Download any Font that you do not already have installed on your PC (Download any from https://www.dafont.com/ for example).
[ ! ] Important: Do not Install this Font locally at any point In the process [ ! ]

2) Create a folder which will contain both the Noesis Studio Project, as well as the chosen downloaded Font.
3) Place the downloaded Font within the folder created in Step 2).
3) Create a Project within the folder created in Step 2).

4) Within Studio, from the Assets Panel, create a new Resource Dictionary.
5) Select the new Resource Dictionary, which will open in within the application.
6) Whilst remaining inside of the new ResourceDictionary, navigate to the Resources Panel, and create a new 'FontFamily' Resource.
7) Set the 'Value' of this new Resource to be the Font downloaded and placed within the Project Directory.
8) Save all open documents.

9) Navigate to the Assets Panel, and open the ResourceDictionary in VSCode.

Observe the unexpected syntax used to reference the Font file.

Expected Results: Fonts set as Resources from within Noesis Studio use a universally-compatible syntax which functions whether the Project is running within Studio, or in-Engine.

10) Create a MainPage.xaml, and place a TextBlock within it.
11) Within the TextBlock Properties, set its FontFamily to utilise the downloaded font.
12) Once the Font has been selected from the 'FontFamily' Dropdown, click on the Property's 3-Dot Menu and 'Convert to Resource' the selected Font.
13) Select to store this new Resource in the GlobalResources.xaml dictionary.
The operation can be confirmed as successful through the Property field gaining a green outline.

14) Navigate to the Assets Panel, and open the GlobalResources Dictionary in VSCode.

Observe how the syntax this time is displaying the expected formatting.

15) (Bonus) - Repeat Step 1) - Step 14) with an Image Asset instead of a Font.
Observe how with an Image Asset, the syntax is written as expected whether the Asset is stored in a GlobalResources Dictionary or a Standalone ResourceDictionary.

PlatformAny

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2025-07-28 14:29 dstewart New Issue
2025-07-28 14:30 dstewart Description Updated
2025-07-28 14:30 dstewart Description Updated
2025-07-28 14:30 dstewart Description Updated
2025-07-28 14:31 dstewart Description Updated
2025-07-28 16:21 sfernandez Assigned To => sfernandez
2025-07-28 16:21 sfernandez Status new => assigned
2025-07-28 16:21 sfernandez Target Version => Studio_Beta
2025-07-28 16:22 sfernandez Status assigned => resolved
2025-07-28 16:22 sfernandez Resolution open => fixed
2025-07-28 16:22 sfernandez Fixed in Version => Studio_Beta