View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001961 | NoesisGUI | Unreal | public | 2021-04-09 05:03 | 2022-03-02 12:32 |
Reporter | Tadinu | Assigned To | hcpizzi | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.0.11 | ||||
Target Version | 3.1.3 | Fixed in Version | 3.1.3 | ||
Summary | 0001961: Font not found in Linux UE4 | ||||
Description | Hi 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. | ||||
Tags | C++, UE4, xaml | ||||
Platform | Linux | ||||
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 | |
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 => |
2022-03-02 12:32 | sfernandez | Fixed in Version | => 3.1.3 |
2022-03-02 12:32 | sfernandez | Target Version | => 3.1.3 |
2022-03-02 12:32 | sfernandez | Status | assigned => resolved |
2022-03-02 12:32 | sfernandez | Resolution | open => fixed |