jp.keijiro.klutter-tools 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -52,16 +52,22 @@ public static class VfxGraphTextEditorModifier
|
|
|
52
52
|
{
|
|
53
53
|
if (!Preferences.VfxGraphChangeFont) return;
|
|
54
54
|
|
|
55
|
-
var
|
|
56
|
-
|
|
55
|
+
var root = window.rootVisualElement;
|
|
56
|
+
var elements = root.Query(className: TextClassName).ToList();
|
|
57
|
+
if (elements.Count == 0) return;
|
|
57
58
|
|
|
58
59
|
if (_font == null)
|
|
59
60
|
_font = Font.CreateDynamicFontFromOSFont
|
|
60
61
|
(new[]{"Courier New"}, Preferences.VfxGraphFontSize);
|
|
61
62
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
element
|
|
63
|
+
var unityFont = new StyleFont(_font);
|
|
64
|
+
|
|
65
|
+
foreach (var element in elements)
|
|
66
|
+
{
|
|
67
|
+
element.style.unityFontDefinition = StyleKeyword.None;
|
|
68
|
+
element.style.unityFont = unityFont;
|
|
69
|
+
element.style.fontSize = Preferences.VfxGraphFontSize;
|
|
70
|
+
}
|
|
65
71
|
}
|
|
66
72
|
|
|
67
73
|
static void CheckAndApplyCustomFont(EditorWindow window)
|