-
- ngzaharias
- Posts: 11
- Joined:
Only installed fonts will work in Noesis Studio
v0.1.227-beta
I'm having issues that a font will not work in Noesis Studio unless I install the font on the PC.
I have the following textblock that will fail to use the font.
If I install the font on the machine and then reference it like so, it works.
However if I take the second one, and turn it into a resource and place it in a dictionary, the dictionary file will report an error and the font will no longer work.
I'm having issues that a font will not work in Noesis Studio unless I install the font on the PC.
I have the following textblock that will fail to use the font.
Code: Select all
<TextBlock Text="TextBlock" TextWrapping="Wrap" FontFamily="D:/Projects/C++/ZEngine/Assets/UI/Fonts/F_SuperFortrees.ttf"/>
Code: Select all
<TextBlock Text="TextBlock" TextWrapping="Wrap" FontFamily="Fonts/#Super Fortrees"/>
Code: Select all
// Default.xaml
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<FontFamily x:Key="Font">Fonts/#Super Fortrees</FontFamily>
</ResourceDictionary>
// MainMenu.xaml
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignWidth="1920"
d:DesignHeight="1080">
<Page.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Themes/Default.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Page.Resources>
Re: Only installed fonts will work in Noesis Studio
Hi ngzaharias, Dorian here!
Thanks for taking the time to drop by and report this.
I've just reproduced your scenario in our latest Studio build 💻 Studio Download (0.1.232-beta) , and was successfully able to get a pair of non-installed fonts to render (one .TTF and one .OTF).
I've also tried with Super Fortrees.ttf specifically just to rule out any issues with this font in particular:
So with the fonts themselves ruled out, lets see if we can diagnose what's going on:
1) The first thing that catches my attention that I'd like to ask you about: is the font (or the folder containing the font) you are trying to reach, in the same directory as your Studio Project?
Studio currently requires that assets used by the Project are stored in the same directory as the Noesis Project itself, so if this is not the case, this would be my first recommendation of what to assess and adjust before re-launching Studio and re-attempting.
Its worth noting however, that within this 'in-directory' constraint, you do have freedom to organise all of your assets as desired; for example you can either put your fonts at the same level as the Project, or within sub-folders.
More information on ↗️ Asset Handling [Noesis Studio Documentation]
2) Secondly, I just wanted to check how you are generating the snippets you pasted. Is this hand-written XAML or is this the XAML generated by Studio?
There does seem to be some discrepancy between the snippets shared and Studio's syntax, which in addition to the storage location situation, may also be at the root of this not working as expected.
Here are some side-by-sides where we can take a look at some of the differences:
For the TextBlock version:
vs Studio-Generated:
Let's start with these two, and let us know if this resolves things.
I'll also include a link to the NoesisGUI ↗️ Text Tutorial [NoesisGUI Documentation] that includes some further technical information on how fonts can be wrangled.
Thanks again for flagging this.
- Dorian
Thanks for taking the time to drop by and report this.
I've just reproduced your scenario in our latest Studio build 💻 Studio Download (0.1.232-beta) , and was successfully able to get a pair of non-installed fonts to render (one .TTF and one .OTF).
I've also tried with Super Fortrees.ttf specifically just to rule out any issues with this font in particular:
So with the fonts themselves ruled out, lets see if we can diagnose what's going on:
1) The first thing that catches my attention that I'd like to ask you about: is the font (or the folder containing the font) you are trying to reach, in the same directory as your Studio Project?
Studio currently requires that assets used by the Project are stored in the same directory as the Noesis Project itself, so if this is not the case, this would be my first recommendation of what to assess and adjust before re-launching Studio and re-attempting.
Its worth noting however, that within this 'in-directory' constraint, you do have freedom to organise all of your assets as desired; for example you can either put your fonts at the same level as the Project, or within sub-folders.
More information on ↗️ Asset Handling [Noesis Studio Documentation]
2) Secondly, I just wanted to check how you are generating the snippets you pasted. Is this hand-written XAML or is this the XAML generated by Studio?
There does seem to be some discrepancy between the snippets shared and Studio's syntax, which in addition to the storage location situation, may also be at the root of this not working as expected.
Here are some side-by-sides where we can take a look at some of the differences:
For the TextBlock version:
Code: Select all
<TextBlock Text="TextBlock" TextWrapping="Wrap" FontFamily="D:/Projects/C++/ZEngine/Assets/UI/Fonts/F_SuperFortrees.ttf"/>Code: Select all
<TextBlock Text="TextBlock" TextWrapping="Wrap" FontFamily="Fonts/#Super Fortrees"/>I'll also include a link to the NoesisGUI ↗️ Text Tutorial [NoesisGUI Documentation] that includes some further technical information on how fonts can be wrangled.
Thanks again for flagging this.
- Dorian
-
- ngzaharias
- Posts: 11
- Joined:
Re: Only installed fonts will work in Noesis Studio
Hi Dorian,
Thanks for the reply!
I'm not sure exactly where things went wrong with what I was trying before, but I just made a fresh project and did everything through studio and it is detecting the font correctly.
If it happens again I'll post again with better repo steps.
Regards,
Nick
Thanks for the reply!
I'm not sure exactly where things went wrong with what I was trying before, but I just made a fresh project and did everything through studio and it is detecting the font correctly.
If it happens again I'll post again with better repo steps.
Regards,
Nick
Re: Only installed fonts will work in Noesis Studio
Hi Nick,
Thank you for the update; fantastic to hear this is now working as expected!
If you do happen to encounter this again, feel free to directly submit a Ticket with repro steps to our Bugtracker and we can look into this further for you!
- Dorian
Thank you for the update; fantastic to hear this is now working as expected!
If you do happen to encounter this again, feel free to directly submit a Ticket with repro steps to our Bugtracker and we can look into this further for you!
- Dorian
Who is online
Users browsing this forum: No registered users and 0 guests