mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-07-05 13:15:32 +02:00
Handle multiple font styles
Adds support for font styles other than normal, such as bold, italics, and bold italics.
This commit is contained in:
parent
fb3fb6855c
commit
3f24fa9bf0
2 changed files with 30 additions and 10 deletions
|
@ -3,6 +3,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include<map>
|
||||
|
||||
#include <godot_cpp/classes/control.hpp>
|
||||
#include <godot_cpp/classes/image_texture.hpp>
|
||||
#include <godot_cpp/classes/rendering_server.hpp>
|
||||
|
@ -27,6 +29,13 @@ namespace godot
|
|||
"normal_font", "bold_font", "italics_font", "bold_italics_font",
|
||||
};
|
||||
|
||||
enum FontType {
|
||||
NORMAL,
|
||||
BOLD,
|
||||
ITALICS,
|
||||
BOLD_ITALICS,
|
||||
};
|
||||
|
||||
public:
|
||||
enum AttrFlag
|
||||
{
|
||||
|
@ -92,8 +101,9 @@ namespace godot
|
|||
tsm_age_t age, void *data);
|
||||
|
||||
PackedColorArray palette;
|
||||
Ref<Font> font;
|
||||
std::map<FontType, Ref<Font>> fonts;
|
||||
int32_t font_size;
|
||||
double font_offset;
|
||||
Vector2 size;
|
||||
Vector2 cell_size;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue