Text elements give: "Invalid value for font Keyword" error despite showing up perfectly?

I am starting to learn UI Toolkit. I have two Labels I added to a UI Document. I have the font selected via the “Font Asset” field. I created the font assets by right clicking on my TTF/OTF fonts and selected “create new text asset.”

With this setup, it works fine visually. Everything looks normal. The fonts and text show up correctly.

However I get the following errors when this UI Document is active:

Invalid value for font Keyword
UnityEngine.GUIUtility.ProcessEvent (int,intptr,bool&)

Invalid value for font Keyword
UnityEngine.GUIUtility.ProcessEvent (int,intptr,bool&)

Invalid value for font Keyword
UnityEngine.UIElements.UIElementsRuntimeUtilityNative:UpdateRuntimePanels ()

Invalid value for font Keyword
UnityEngine.UIElements.UIElementsRuntimeUtilityNative:UpdateRuntimePanels ()

The “Font” field on the labels is left blank as anything I enter there gets cleared and doesn’t seem to do anything.

What does this mean and how do I get rid of this error?

Hi @mikemohan !

Would you mind logging a bug for this (Help/Report a bug…)?

As for this, the UI is indeed unclear. FontAsset has precedence over Font. In other words, if a FontAsset is assigned it will override the Font so changing the Font will have no effect.