I’m working on a custom graph editor using the GraphView visual element. The GraphView uses the old Unity editor fonts but I’d like to change it to use the new built-in Inter font.
Is there a way to load the the font using USS and apply it to all child elements of the GraphView?
To those interested, you can find the font paths used by the editor by going to the install folder and opening the file “Editor/Data/Resources/unity editor resources” in a text editor. Don’t overwrite it, but you can search for the string “.ttf” and find all the fonts used by the editor. The path to the Inter font is “Fonts/Inter/Inter-Regular.ttf”.
In .uss you just use a selector to select all the children of the graph view: