mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 17:58:03 -06:00
ENH: font preview
Change-Id: I8151036cedcba9c57183414a9d134741bb2166a5 Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
parent
4ee5dbb07f
commit
110d81f6f7
9 changed files with 372 additions and 26 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "GLGizmoBase.hpp"
|
||||
#include "slic3r/GUI/3DScene.hpp"
|
||||
|
||||
#include "../GLTexture.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
|
@ -22,9 +22,27 @@ private:
|
|||
bool m_bold = true;
|
||||
bool m_italic = false;
|
||||
float m_thickness = 2.f;
|
||||
float m_combo_height = 0.0f;
|
||||
float m_combo_width = 0.0f;
|
||||
float m_scale;
|
||||
|
||||
class TextureInfo {
|
||||
public:
|
||||
GLTexture* texture { nullptr };
|
||||
int h;
|
||||
int w;
|
||||
int hl;
|
||||
|
||||
std::string font_name;
|
||||
};
|
||||
|
||||
std::vector<TextureInfo> m_textures;
|
||||
|
||||
public:
|
||||
GLGizmoText(GLCanvas3D& parent, const std::string& icon_filename, unsigned int sprite_id);
|
||||
~GLGizmoText();
|
||||
|
||||
void update_font_texture();
|
||||
|
||||
protected:
|
||||
virtual bool on_init() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue