samc
Topic Author
Posts: 71
Joined: 21 Aug 2019, 19:22

trouble with fonts on 3.0.11

17 Mar 2021, 05:53

Having difficulty with Fonts.

I just upgraded to 3.0.11 from 3.0.9, and it appears that any text that does not have a family explicitly defined is invisible in Unity, but is fine in Blend. If I change the family, everything is fine. I double checked the theme and it looks ok (no accidental changes from 3.0.9). In addition, I changed the "Default Font" in the Noesis Settings to match the font in my theme, but it still didn't work.

Separate, but potentially related:

There is some real oddness happening with the fonts in my theme. My fonts reside in the same directory as my theme files. We did this because otherwise Blend doesn't show the fonts when I select the Theme.Fonts asset.. In other words, the font reference looks like this:
<FontFamily x:Key="Font.Family.Default">#PT Root UI</FontFamily>
And the font asset won't list any fonts as being referenced.

However, if I change the font reference to look like this (with a relative path reference):
<FontFamily x:Key="Font.Family.Default">./#PT Root UI</FontFamily>
Then the font theme asset DOES show the fonts in the font list, however now the fonts in Blend dont' work properly any longer.

Suggestions?
thanks,
sam
 
User avatar
sfernandez
Site Admin
Posts: 2983
Joined: 22 Dec 2011, 19:20

Re: trouble with fonts on 3.0.11

17 Mar 2021, 12:57

Hi Sam,
any text that does not have a family explicitly defined is invisible in Unity, but is fine in Blend. If I change the family, everything is fine. I double checked the theme and it looks ok (no accidental changes from 3.0.9). In addition, I changed the "Default Font" in the Noesis Settings to match the font in my theme, but it still didn't work.
If you inspect in Unity the theme xaml asset, does it have the font as a dependency?
How are you specifying the FontFamily, in the root of your UserControls? If you don't set it there it will fallback to the default font specified in the Noesis Settings. And in Blend it will fallback to the operating system default font.
There is some real oddness happening with the fonts in my theme. My fonts reside in the same directory as my theme files. We did this because otherwise Blend doesn't show the fonts when I select the Theme.Fonts asset.. In other words, the font reference looks like this: <FontFamily x:Key="Font.Family.Default">#PT Root UI</FontFamily>
When you don't specify a path in the FontFamily (even if the name contains the # symbol), the font it is considered as a system font. You can read more about this here: https://www.noesisengine.com/docs/Gui.C ... ont-family
You can use a relative path like "./#PT Root UI" or an absolute path like "/FontsTest;component/Assets/GUI/Theme/#PT Root UI". Both should work fine in Blend and Unity as I've just verified.

If you go back to NoesisGUI 3.0.9 without modifying anything else, are the fonts working fine again?
 
samc
Topic Author
Posts: 71
Joined: 21 Aug 2019, 19:22

Re: trouble with fonts on 3.0.11

17 Mar 2021, 22:32

Restarting unity seems to have fixed this.

In general, it looks like Noesis complains for everyone the first time they launch it, saying the fonts are not found, but if you relaunch unity everything works.

sam
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: trouble with fonts on 3.0.11

18 Mar 2021, 12:40

We will try to reproduce this. This must be fixed. When you say "for everyone the first time they launch it", you mean after a new upgrade right? Or this is happening from time to time without upgrading?
 
samc
Topic Author
Posts: 71
Joined: 21 Aug 2019, 19:22

Re: trouble with fonts on 3.0.11

19 Mar 2021, 18:37

Yes, it happens once for everyone after the upgrade. Not positive re: happening from time to time without upgrade. It might be a product of assets that need to be imported? Will try to do some tests here.

sam
 
User avatar
sfernandez
Site Admin
Posts: 2983
Joined: 22 Dec 2011, 19:20

Re: trouble with fonts on 3.0.11

22 Mar 2021, 20:01

Yes, it happens once for everyone after the upgrade.
I've been trying to reproduce this issue without success. What I've been doing to upgrade the plugin is:
1. Close Unity.
2. Delete Assets/NoesisGUI/Plugins folder.
3. Open Unity and click "Ignore" on Enter Safe Mode dialog (ignoring compiler errors).
4. Import NoesisGUI package to install the plugin.

After this I can hit Play and everything works as expected.

What steps do you follow to upgrade our plugin?

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 29 guests