You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Merge pull request #46045 from bruvzg/text_server_bmp_create
[TextServer] Restores bitmap font dynamic construction functions.
This commit is contained in:
@@ -192,18 +192,6 @@ public:
|
||||
Vector<TextServer::Glyph> glyphs_logical;
|
||||
};
|
||||
|
||||
struct BitmapFontData {
|
||||
int height = 0;
|
||||
int ascent = 0;
|
||||
int charcount = 0;
|
||||
const int *char_rects = nullptr;
|
||||
int kerning_count = 0;
|
||||
const int *kernings = nullptr;
|
||||
int w = 0;
|
||||
int h = 0;
|
||||
const unsigned char *img = nullptr;
|
||||
};
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
||||
@@ -236,6 +224,11 @@ public:
|
||||
virtual RID create_font_system(const String &p_name, int p_base_size = 16) = 0;
|
||||
virtual RID create_font_resource(const String &p_filename, int p_base_size = 16) = 0;
|
||||
virtual RID create_font_memory(const uint8_t *p_data, size_t p_size, const String &p_type, int p_base_size = 16) = 0;
|
||||
virtual RID create_font_bitmap(float p_height, float p_ascent, int p_base_size = 16) = 0;
|
||||
|
||||
virtual void font_bitmap_add_texture(RID p_font, const Ref<Texture> &p_texture) = 0;
|
||||
virtual void font_bitmap_add_char(RID p_font, char32_t p_char, int p_texture_idx, const Rect2 &p_rect, const Size2 &p_align, float p_advance) = 0;
|
||||
virtual void font_bitmap_add_kerning_pair(RID p_font, char32_t p_A, char32_t p_B, int p_kerning) = 0;
|
||||
|
||||
virtual float font_get_height(RID p_font, int p_size) const = 0;
|
||||
virtual float font_get_ascent(RID p_font, int p_size) const = 0;
|
||||
|
||||
Reference in New Issue
Block a user