]> git.nega.tv - josh/narcissus/commitdiff
shark: Only write two lines of text
authorJoshua Simmons <josh@nega.tv>
Wed, 1 May 2024 18:54:54 +0000 (20:54 +0200)
committerJoshua Simmons <josh@nega.tv>
Wed, 1 May 2024 18:54:54 +0000 (20:54 +0200)
title/shark/src/main.rs

index 9f17fc787f15dd78f6673dcb5d0aab165afab2d7..00532d2bdbf1fabf8bbd03f36c0ee03409fbd77b 100644 (file)
@@ -578,11 +578,11 @@ pub fn main() {
         primitive_instances.clear();
         primitive_vertices.clear();
 
-        for line in 0.. {
+        for line in 0..2 {
             let (font_family, font_size_px, text) = if line & 1 == 0 {
-                (FontFamily::RobotoRegular, 14.0, line0)
+                (FontFamily::RobotoRegular, 22.0, line0)
             } else {
-                (FontFamily::NotoSansJapanese, 14.0, line1)
+                (FontFamily::NotoSansJapanese, 22.0, line1)
             };
 
             let font = fonts.font(font_family);
@@ -591,10 +591,6 @@ pub fn main() {
             x = 0.0;
             y += (font.ascent() - font.descent() + font.line_gap()) * scale;
 
-            if y > height as f32 {
-                break;
-            }
-
             font_size_str.clear();
             write!(&mut font_size_str, "{font_size_px}: ").unwrap();