aboutsummaryrefslogtreecommitdiff
path: root/src/main.odin
diff options
context:
space:
mode:
authorSan Jacobs2023-10-14 12:14:02 +0200
committerSan Jacobs2023-10-14 12:14:02 +0200
commit56b701ded16bad6f4599be61263c1574d5297288 (patch)
treeb924e5ef5905daba2fbc90d0aff679cf7e4030fa /src/main.odin
parent1197fa1b73bb60dd7bbc67d046e5f8172c3dcfab (diff)
downloadsatscalc-56b701ded16bad6f4599be61263c1574d5297288.tar.gz
satscalc-56b701ded16bad6f4599be61263c1574d5297288.tar.bz2
satscalc-56b701ded16bad6f4599be61263c1574d5297288.zip
Fonts are now in the global scope
Diffstat (limited to 'src/main.odin')
-rw-r--r--src/main.odin13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main.odin b/src/main.odin
index e06639f..9689598 100644
--- a/src/main.odin
+++ b/src/main.odin
@@ -9,6 +9,10 @@ import rl "vendor:raylib"
UBUNTU_MONO := #load("../res/UbuntuMono-Regular.ttf")
+font : rl.Font
+big_font : rl.Font
+small_font : rl.Font
+
main :: proc() {
// TODO: Replace the dynamic array of Workday-pointers with
@@ -70,18 +74,15 @@ main :: proc() {
// Loading fonts - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
font_size :: 18
- font: Font = LoadFontFromMemory(".ttf", raw_data(UBUNTU_MONO), i32(len(UBUNTU_MONO)), font_size, nil, 0)
- //font: Font = LoadFontEx("res/UbuntuMono-Regular.ttf", font_size, nil, 0)
+ font = LoadFontFromMemory(".ttf", raw_data(UBUNTU_MONO), i32(len(UBUNTU_MONO)), font_size, nil, 0)
defer UnloadFont(font)
small_font_size :: 14
- small_font: Font = LoadFontFromMemory(".ttf", raw_data(UBUNTU_MONO), i32(len(UBUNTU_MONO)), small_font_size, nil, 0)
- //small_font: Font = LoadFontEx("res/UbuntuMono-Regular.ttf", small_font_size, nil, 0)
+ small_font = LoadFontFromMemory(".ttf", raw_data(UBUNTU_MONO), i32(len(UBUNTU_MONO)), small_font_size, nil, 0)
defer UnloadFont(small_font)
big_font_size :: 24
- big_font: Font = LoadFontFromMemory(".ttf", raw_data(UBUNTU_MONO), i32(len(UBUNTU_MONO)), big_font_size, nil, 0)
- //big_font: Font = LoadFontEx("res/UbuntuMono-Regular.ttf", big_font_size, nil, 0)
+ big_font = LoadFontFromMemory(".ttf", raw_data(UBUNTU_MONO), i32(len(UBUNTU_MONO)), big_font_size, nil, 0)
defer UnloadFont(big_font)
// oui stuff