From 898f276eba102ffdb99539fb85eb70d7cbb28d74 Mon Sep 17 00:00:00 2001 From: blinry Date: Tue, 10 Nov 2020 23:17:48 +0100 Subject: [PATCH] Make fonts 15% larger This should help make the game more accessible, and reduce font rendering issues. Closes #5. --- fonts/big.tres | 2 +- fonts/default.tres | 2 +- fonts/monospace.tres | 2 +- fonts/small.tres | 7 +++++++ project.godot | 1 + resources/cards.json | 2 +- scenes/card.tscn | 14 +++++++------- scenes/file_browser.tscn | 8 ++++---- scenes/file_browser_item.tscn | 8 ++++---- scenes/main.tscn | 32 +++++++++++++++++--------------- 10 files changed, 44 insertions(+), 34 deletions(-) create mode 100644 fonts/small.tres diff --git a/fonts/big.tres b/fonts/big.tres index d094bba..6545a61 100644 --- a/fonts/big.tres +++ b/fonts/big.tres @@ -3,5 +3,5 @@ [ext_resource path="res://fonts/cabin-bold.ttf" type="DynamicFontData" id=1] [resource] -size = 40 +size = 45 font_data = ExtResource( 1 ) diff --git a/fonts/default.tres b/fonts/default.tres index 56a6493..b32511a 100644 --- a/fonts/default.tres +++ b/fonts/default.tres @@ -3,5 +3,5 @@ [ext_resource path="res://fonts/cabin-regular.ttf" type="DynamicFontData" id=1] [resource] -size = 20 +size = 23 font_data = ExtResource( 1 ) diff --git a/fonts/monospace.tres b/fonts/monospace.tres index 1835b61..e3bced9 100644 --- a/fonts/monospace.tres +++ b/fonts/monospace.tres @@ -3,5 +3,5 @@ [ext_resource path="res://fonts/iosevka-regular.ttf" type="DynamicFontData" id=1] [resource] -size = 20 +size = 21 font_data = ExtResource( 1 ) diff --git a/fonts/small.tres b/fonts/small.tres new file mode 100644 index 0000000..0fec375 --- /dev/null +++ b/fonts/small.tres @@ -0,0 +1,7 @@ +[gd_resource type="DynamicFont" load_steps=2 format=2] + +[ext_resource path="res://fonts/cabin-regular.ttf" type="DynamicFontData" id=1] + +[resource] +size = 15 +font_data = ExtResource( 1 ) diff --git a/project.godot b/project.godot index 724a72a..1354863 100644 --- a/project.godot +++ b/project.godot @@ -64,6 +64,7 @@ levels="*res://scenes/levels.gd" window/size/width=1920 window/size/height=1080 +window/dpi/allow_hidpi=true window/stretch/mode="2d" window/stretch/aspect="keep" diff --git a/resources/cards.json b/resources/cards.json index ef9fce5..f458136 100644 --- a/resources/cards.json +++ b/resources/cards.json @@ -12,7 +12,7 @@ { "id": "commit-auto", "command": "git add .; git commit", - "description": "Make a new commit containing your current environment!\nDrag this card anywhere. You'll be asked to enter a short description of what you changed." + "description": "Make a new commit containing your current environment!\nYou'll be asked to enter a short description of what you changed." }, { "id": "merge", diff --git a/scenes/card.tscn b/scenes/card.tscn index 00fcf43..fd5b061 100644 --- a/scenes/card.tscn +++ b/scenes/card.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=10 format=2] +[gd_scene load_steps=11 format=2] [ext_resource path="res://fonts/default.tres" type="DynamicFont" id=1] [ext_resource path="res://nodes/blob.svg" type="Texture" id=2] @@ -6,6 +6,7 @@ [ext_resource path="res://sounds/swish.wav" type="AudioStream" id=4] [ext_resource path="res://sounds/swoosh.wav" type="AudioStream" id=5] [ext_resource path="res://sounds/poof.wav" type="AudioStream" id=6] +[ext_resource path="res://fonts/small.tres" type="DynamicFont" id=7] [sub_resource type="StyleBoxFlat" id=1] bg_color = Color( 0.45098, 0.584314, 0.843137, 1 ) @@ -90,10 +91,9 @@ __meta__ = { [node name="Description" type="Label" parent="."] margin_left = -92.0 margin_top = -160.0 -margin_right = 146.0 -margin_bottom = 31.0 -rect_scale = Vector2( 0.75, 0.75 ) -custom_fonts/font = ExtResource( 1 ) +margin_right = 90.0 +margin_bottom = -14.0 +custom_fonts/font = ExtResource( 7 ) custom_colors/font_color = Color( 0, 0, 0, 1 ) text = "Description" autowrap = true @@ -134,9 +134,9 @@ volume_db = -6.848 [node name="Image" type="TextureRect" parent="."] margin_left = -88.0 -margin_top = -243.735 +margin_top = -219.0 margin_right = 85.0 -margin_bottom = -178.735 +margin_bottom = -178.0 mouse_filter = 2 expand = true stretch_mode = 6 diff --git a/scenes/file_browser.tscn b/scenes/file_browser.tscn index ed8f98c..90f1056 100644 --- a/scenes/file_browser.tscn +++ b/scenes/file_browser.tscn @@ -46,7 +46,7 @@ __meta__ = { [node name="Title" type="Label" parent="Panel/Margin/Rows"] margin_right = 1904.0 -margin_bottom = 25.0 +margin_bottom = 32.0 text = "title" align = 1 @@ -69,7 +69,7 @@ margin_bottom = 50.0 text = "dir" [node name="Scroll" type="ScrollContainer" parent="Panel/Margin/Rows"] -margin_top = 25.0 +margin_top = 32.0 margin_right = 1904.0 margin_bottom = 1064.0 size_flags_horizontal = 3 @@ -77,12 +77,12 @@ size_flags_vertical = 3 [node name="Grid" type="GridContainer" parent="Panel/Margin/Rows/Scroll"] margin_right = 1904.0 -margin_bottom = 1039.0 +margin_bottom = 1032.0 size_flags_horizontal = 3 size_flags_vertical = 3 custom_constants/vseparation = 16 custom_constants/hseparation = 16 -columns = 3 +columns = 4 __meta__ = { "_edit_use_anchors_": false } diff --git a/scenes/file_browser_item.tscn b/scenes/file_browser_item.tscn index 6880bd5..82c8cb1 100644 --- a/scenes/file_browser_item.tscn +++ b/scenes/file_browser_item.tscn @@ -10,7 +10,7 @@ anchor_right = 0.104 anchor_bottom = 0.126 margin_right = 0.319992 margin_bottom = -0.0800018 -rect_min_size = Vector2( 175, 150 ) +rect_min_size = Vector2( 140, 140 ) mouse_filter = 1 script = ExtResource( 1 ) __meta__ = { @@ -39,7 +39,7 @@ __meta__ = { [node name="Control" type="Control" parent="VBoxContainer"] margin_right = 200.0 -margin_bottom = 94.0 +margin_bottom = 87.0 mouse_filter = 2 size_flags_vertical = 3 @@ -83,9 +83,9 @@ __meta__ = { } [node name="Label" type="Label" parent="VBoxContainer"] -margin_top = 98.0 +margin_top = 91.0 margin_right = 200.0 -margin_bottom = 150.0 +margin_bottom = 140.0 size_flags_vertical = 7 size_flags_stretch_ratio = 0.55 custom_fonts/font = ExtResource( 2 ) diff --git a/scenes/main.tscn b/scenes/main.tscn index f40c7b7..7cf970e 100644 --- a/scenes/main.tscn +++ b/scenes/main.tscn @@ -87,31 +87,33 @@ margin_right = 633.0 margin_bottom = 383.0 size_flags_horizontal = 3 size_flags_vertical = 3 +custom_constants/separation = 8 [node name="Menu" type="HBoxContainer" parent="Rows/Columns/RightSide/LevelInfo"] margin_right = 633.0 -margin_bottom = 35.0 +margin_bottom = 39.0 +custom_constants/separation = 8 [node name="ChapterSelect" type="OptionButton" parent="Rows/Columns/RightSide/LevelInfo/Menu"] -margin_right = 168.0 -margin_bottom = 35.0 +margin_right = 187.0 +margin_bottom = 39.0 focus_mode = 0 enabled_focus_mode = 0 text = "Select chapter..." [node name="LevelSelect" type="OptionButton" parent="Rows/Columns/RightSide/LevelInfo/Menu"] -margin_left = 173.0 -margin_right = 317.0 -margin_bottom = 35.0 +margin_left = 195.0 +margin_right = 354.0 +margin_bottom = 39.0 focus_mode = 0 enabled_focus_mode = 0 text = "Select level..." expand_icon = true [node name="ReloadButton" type="Button" parent="Rows/Columns/RightSide/LevelInfo/Menu"] -margin_left = 322.0 -margin_right = 401.0 -margin_bottom = 35.0 +margin_left = 362.0 +margin_right = 450.0 +margin_bottom = 39.0 focus_mode = 0 enabled_focus_mode = 0 text = "Reload" @@ -132,9 +134,9 @@ __meta__ = { } [node name="NextLevelButton" type="Button" parent="Rows/Columns/RightSide/LevelInfo/Menu"] -margin_left = 406.0 -margin_right = 511.0 -margin_bottom = 35.0 +margin_left = 458.0 +margin_right = 575.0 +margin_bottom = 39.0 focus_mode = 0 custom_styles/hover = SubResource( 1 ) custom_styles/normal = ExtResource( 4 ) @@ -145,12 +147,13 @@ __meta__ = { } [node name="LevelPanel" type="VBoxContainer" parent="Rows/Columns/RightSide/LevelInfo"] -margin_top = 40.0 +margin_top = 47.0 margin_right = 633.0 margin_bottom = 383.0 size_flags_vertical = 3 [node name="LevelName" type="RichTextLabel" parent="Rows/Columns/RightSide/LevelInfo/LevelPanel"] +visible = false margin_right = 633.0 margin_bottom = 60.0 rect_min_size = Vector2( 0, 60 ) @@ -161,9 +164,8 @@ __meta__ = { } [node name="Text" type="Control" parent="Rows/Columns/RightSide/LevelInfo/LevelPanel"] -margin_top = 65.0 margin_right = 633.0 -margin_bottom = 343.0 +margin_bottom = 336.0 size_flags_vertical = 3 [node name="LevelDescription" type="RichTextLabel" parent="Rows/Columns/RightSide/LevelInfo/LevelPanel/Text"]