summaryrefslogtreecommitdiff
path: root/modules/text_server_fb
diff options
context:
space:
mode:
Diffstat (limited to 'modules/text_server_fb')
-rw-r--r--modules/text_server_fb/bitmap_font_fb.cpp2
-rw-r--r--modules/text_server_fb/dynamic_font_fb.h13
2 files changed, 6 insertions, 9 deletions
diff --git a/modules/text_server_fb/bitmap_font_fb.cpp b/modules/text_server_fb/bitmap_font_fb.cpp
index 6bc838bd6a..c9a9cc6eba 100644
--- a/modules/text_server_fb/bitmap_font_fb.cpp
+++ b/modules/text_server_fb/bitmap_font_fb.cpp
@@ -148,7 +148,7 @@ Error BitmapFontDataFallback::load_from_file(const String &p_filename, int p_bas
char_map[idx] = c;
} else if (type == "kerning") {
KerningPairKey kpk;
- float k = 0;
+ float k = 0.0;
if (keys.has("first")) {
kpk.A = keys["first"].to_int();
}
diff --git a/modules/text_server_fb/dynamic_font_fb.h b/modules/text_server_fb/dynamic_font_fb.h
index f1cd758f2c..81b18f6af3 100644
--- a/modules/text_server_fb/dynamic_font_fb.h
+++ b/modules/text_server_fb/dynamic_font_fb.h
@@ -70,14 +70,11 @@ private:
uint32_t size : 16;
uint32_t outline_size : 16;
};
- uint32_t key;
+ uint32_t key = 0;
};
bool operator<(CacheID right) const {
return key < right.key;
}
- CacheID() {
- key = 0;
- }
};
struct DataAtSize {
@@ -86,10 +83,10 @@ private:
int size = 0;
float scale_color_font = 1.f;
- float ascent = 0;
- float descent = 0;
- float underline_position = 0;
- float underline_thickness = 0;
+ float ascent = 0.0;
+ float descent = 0.0;
+ float underline_position = 0.0;
+ float underline_thickness = 0.0;
Vector<CharTexture> textures;
HashMap<char32_t, Character> char_map;