Skip to content

Commit dead1d0

Browse files
committed
Added: Monospaced font to characters
1 parent 637b59f commit dead1d0

File tree

6 files changed

+45
-1
lines changed

6 files changed

+45
-1
lines changed

Editor/Resources.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/Resources/Fonts.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/Resources/Fonts/monospaced.ttf

118 KB
Binary file not shown.

Editor/Resources/Fonts/monospaced.ttf.meta

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/UI/BitmapFontCreatorEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ private void DrawCharactersField()
118118
_charactersScrollPos = GUILayout.BeginScrollView(_charactersScrollPos, false, false, GUIStyle.none, GUI.skin.verticalScrollbar, GUILayout.Height(100));
119119

120120
EditorGUI.BeginChangeCheck();
121-
_data.Characters = GUILayout.TextArea(_data.Characters, EditorStyles.textArea, GUILayout.ExpandHeight(true));
121+
_data.Characters = GUILayout.TextArea(_data.Characters, Styles.CharactersField);
122122
if (EditorGUI.EndChangeCheck())
123123
_selectedCharacterSetIndex = 0;
124124

Editor/UI/UIModel.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ internal static class Styles
8686
contentOffset = new Vector2(-17, 0),
8787
};
8888

89+
public static readonly GUIStyle CharactersField = new(EditorStyles.textArea)
90+
{
91+
font = Resources.Load<Font>("Fonts/monospaced"),
92+
stretchHeight = true,
93+
normal = new() { textColor = Color.white },
94+
};
95+
8996
public static readonly GUIStyle CreateButton = new(GUI.skin.button)
9097
{
9198
padding = new(20, 20, 7, 8),

0 commit comments

Comments
 (0)