View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002103 | NoesisGUI | Unity3D | public | 2021-09-02 19:23 | 2021-09-06 11:05 |
Reporter | rachelle | Assigned To | sfernandez | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.1.0 | ||||
Target Version | 3.1.1 | Fixed in Version | 3.1.1 | ||
Summary | 0002103: Custom fonts defined in a theme failing to load after upgrading to 3.1.0 | ||||
Description | We have just upgraded our Unity integration to NoesisGUI 3.1.0. We have a folder structure like this: -- Assets -- Scripts -- Runtime -- Client -- UI -- Themes GameTheme.xaml GameTheme.Fonts.xaml -- Fonts CustomFontA.otf CustomFontB.otf CustomFontC.otf GameTheme.xaml looks something like this: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib"> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="GameTheme.Fonts.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> GameTheme.Fonts.xaml looks something like this: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib"> <FontFamily x:Key="Font.Family.CustomFontA">/Blend;component/Assets/Scripts/Runtime/Client/UI/Themes/Fonts/#Custom Font A</FontFamily> <FontFamily x:Key="Font.Family.CustomFontB">/Blend;component/Assets/Scripts/Runtime/Client/UI/Themes/Fonts/#Custom Font B</FontFamily> <FontFamily x:Key="Font.Family.CustomFontC">/Blend;component/Assets/Scripts/Runtime/Client/UI/Themes/Fonts/#Custom Font C</FontFamily> </ResourceDictionary> We specify the paths this way so that the fonts show up correctly in our Unity game as well as in Blend where our designers are directly editing the UI layouts. All of our TextBlocks in the xaml files driving the UI we're using in-game make reference to these custom fonts by specifying the FontFamily property, like this: FontFamily="{StaticResource Font.Family.CustomFontA}" For each of our custom fonts, though, we are seeing this error: [noesis] Assets/Scripts/Runtime/Client/UI/Themes/GameTheme.Fonts.xaml(8): Font not found '/Blend;component/Assets/Scripts/Runtime/Client/UI/Themes/Fonts/#Custom Font A' The custom fonts are still showing up in Blend, but the "not found" errors in Unity are preventing the custom fonts from showing up in-game. This worked before the upgrade, when we were on NoesisGUI 3.0.12. A re-import of the themes folder, fonts folder, and all xaml in the UI folder does not resolve the issue. According to sfernandez in our forum discussion (https://www.noesisengine.com/forums/viewtopic.php?f=3&t=2411) this is due to the Uri containing the assembly part. | ||||
Tags | No tags attached. | ||||
Platform | Any | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2021-09-02 19:23 | rachelle | New Issue | |
2021-09-02 19:48 | sfernandez | Assigned To | => sfernandez |
2021-09-02 19:48 | sfernandez | Status | new => assigned |
2021-09-02 19:48 | sfernandez | Target Version | => 3.1.1 |
2021-09-06 11:05 | sfernandez | Status | assigned => resolved |
2021-09-06 11:05 | sfernandez | Resolution | open => fixed |
2021-09-06 11:05 | sfernandez | Fixed in Version | => 3.1.1 |