summaryrefslogtreecommitdiff
path: root/scene/resources/font.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/font.h')
-rw-r--r--scene/resources/font.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/resources/font.h b/scene/resources/font.h
index 076532f390..14312308bb 100644
--- a/scene/resources/font.h
+++ b/scene/resources/font.h
@@ -36,7 +36,6 @@
#include "scene/resources/texture.h"
class Font : public Resource {
-
GDCLASS(Font, Resource);
protected:
@@ -47,6 +46,8 @@ public:
virtual float get_ascent() const = 0;
virtual float get_descent() const = 0;
+ virtual float get_underline_position() const = 0;
+ virtual float get_underline_thickness() const = 0;
virtual Size2 get_char_size(CharType p_char, CharType p_next = 0) const = 0;
Size2 get_string_size(const String &p_string) const;
@@ -104,7 +105,6 @@ public:
};
class BitmapFont : public Font {
-
GDCLASS(BitmapFont, Font);
RES_BASE_EXTENSION("font");
@@ -112,7 +112,6 @@ class BitmapFont : public Font {
public:
struct Character {
-
int texture_idx;
Rect2 rect;
float v_align;
@@ -126,7 +125,6 @@ public:
};
struct KerningPairKey {
-
union {
struct {
uint32_t A, B;
@@ -167,6 +165,8 @@ public:
void set_ascent(float p_ascent);
float get_ascent() const;
float get_descent() const;
+ float get_underline_position() const;
+ float get_underline_thickness() const;
void add_texture(const Ref<Texture2D> &p_texture);
void add_char(CharType p_char, int p_texture_idx, const Rect2 &p_rect, const Size2 &p_align, float p_advance = -1);
@@ -200,7 +200,7 @@ public:
class ResourceFormatLoaderBMFont : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_use_sub_threads = false, float *r_progress = nullptr);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;