View Issue Details

IDProjectCategoryView StatusLast Update
0001961NoesisGUIUnrealpublic2021-04-19 12:16
ReporterTadinuAssigned Tohcpizzi 
PrioritynormalSeveritymajorReproducibilityalways
Status assignedResolutionopen 
Product Version3.0.11 
Target VersionFixed in Version 
Summary0001961: Font not found in Linux UE4
DescriptionHi Noesis,

Regarding these warnings as running in Linux UE 4.26.1:
[2021.03.31-10.26.54:161][ 0]LogNoesis: Warning: Theme/NoesisTheme.Fonts.xaml(6): Font not found 'Fonts/#PT Root UI'
[2021.03.31-10.26.57:020][ 0]LogNoesis: Warning: UserControls/MainWindow.xaml(1): Font not found './#Aero Matics'
https://github.com/Noesis/Tutorials/blob/master/Samples/UserControl/UE4/Assets/UserControl/MainWindow.xaml#L8
And this function keeps returning False:
https://github.com/Noesis/UE4Plugin/blob/master/Source/NoesisRuntime/Private/NoesisResourceProvider.cpp#L111

But somehow, this project here could still display the fonts fine.
https://github.com/Noesis/Tutorials/tree/master/Samples/UserControl/UE4

However, on my custom project with I put all of fonts under a Plugin's Content folder (instead of directly under Project/Content folder), my fonts could not be found.
Specifically, ‚Äčthese are what I found:
* It looks like the font folder path registration here:
https://github.com/Noesis/UE4Plugin/blob/master/Source/NoesisRuntime/Private/NoesisResourceProvider.cpp#L99
is required to be consistent with font fallback family registration here:
https://github.com/Noesis/UE4Plugin/blob/master/Source/NoesisRuntime/Private/NoesisSettings.cpp#L157

* For some reason, the font fallback registration:
https://github.com/Noesis/UE4Plugin/blob/master/Source/NoesisRuntime/Private/NoesisSettings.cpp#L186
seems to automatically chop off the leading slash character if being present in the family name path.
=> This seems to be not in line with the font path expansion in XAML file, since when I tried using "../" in the font path specified here:
https://github.com/Noesis/Tutorials/blob/master/Samples/UserControl/UE4/Assets/UserControl/MainWindow.xaml#L8
, it resolves to an absolute path with the leading slash character (if it reaches the Content folder in a Plugin) thus cause a "Font not found" warning.

I then have to do some post processing to the path check in FamilyExist() function that also chops off the leading slash if present, just to adapt to the above mentioned behavior.
I'm not sure about the internal implementation, but to make it simple & consistent I would suggest:
* To allow both absolute path (if explicit clarity-favored) and relative font family path (if portability-favored) to be specified in XAML. It will then be resolved to the absolute path anyway I suppose.
* Always the absolute UE asset package path to be added into Noesis::GUI::SetFontFallbacks() and Noesis::CachedFontProvider::RegisterFont(), to make it match the resolved absolute path from XAML.

Thanks.
TagsC++, UE4, xaml
PlatformLinux

Relationships

has duplicate 0001951 assignedhcpizzi XAML assets not recognized as placed in Plugin's Content 

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2021-04-09 05:03 Tadinu New Issue
2021-04-09 05:03 Tadinu Status new => assigned
2021-04-09 05:03 Tadinu Assigned To => hcpizzi
2021-04-09 05:03 Tadinu Tag Attached: C++
2021-04-09 05:03 Tadinu Tag Attached: UE4
2021-04-09 05:03 Tadinu Tag Attached: xaml
2021-04-09 05:03 Tadinu Description Updated View Revisions
2021-04-12 10:51 jsantos Target Version => 3.0.12
2021-04-19 12:16 sfernandez Relationship added has duplicate 0001951
2021-04-19 12:16 sfernandez Target Version 3.0.12 =>