mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-04 16:35:12 +08:00
imgui: Yet another font size fix
This commit is contained in:
parent
305b07978c
commit
c99fe20504
@ -340,13 +340,11 @@ bool ImGuiWrapper::want_any_input() const
|
|||||||
|
|
||||||
void ImGuiWrapper::init_font()
|
void ImGuiWrapper::init_font()
|
||||||
{
|
{
|
||||||
const float font_size = m_font_size * m_style_scaling;
|
|
||||||
|
|
||||||
destroy_font();
|
destroy_font();
|
||||||
|
|
||||||
ImGuiIO& io = ImGui::GetIO();
|
ImGuiIO& io = ImGui::GetIO();
|
||||||
io.Fonts->Clear();
|
io.Fonts->Clear();
|
||||||
ImFont* font = io.Fonts->AddFontFromFileTTF((Slic3r::resources_dir() + "/fonts/NotoSans-Regular.ttf").c_str(), font_size, nullptr, m_glyph_ranges);
|
ImFont* font = io.Fonts->AddFontFromFileTTF((Slic3r::resources_dir() + "/fonts/NotoSans-Regular.ttf").c_str(), m_font_size, nullptr, m_glyph_ranges);
|
||||||
if (font == nullptr) {
|
if (font == nullptr) {
|
||||||
font = io.Fonts->AddFontDefault();
|
font = io.Fonts->AddFontDefault();
|
||||||
if (font == nullptr) {
|
if (font == nullptr) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user