File tree Expand file tree Collapse file tree 4 files changed +9
-2
lines changed Expand file tree Collapse file tree 4 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -43,10 +43,10 @@ namespace mlx
43
43
Text& new_text = p_scene->CreateText (str);
44
44
new_text.SetPosition (Vec2f{ static_cast <float >(x), static_cast <float >(y) });
45
45
new_text.SetColor (std::move (vec_color));
46
- if (m_pixelput_called)
46
+ // if(m_pixelput_called)
47
47
{
48
48
m_draw_layer++;
49
- m_pixelput_called = false ;
49
+ // m_pixelput_called = false;
50
50
}
51
51
}
52
52
else if (!p_scene->IsTextAtGivenDrawLayer (str, m_draw_layer))
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ namespace mlx
39
39
inline void RegisterFont (std::shared_ptr<Font> font);
40
40
inline void UnregisterFont (std::shared_ptr<Font> font);
41
41
inline std::shared_ptr<Font> GetFont (const std::filesystem::path& name, float scale);
42
+ inline void Reset ();
42
43
43
44
~FontRegistry () = default ;
44
45
Original file line number Diff line number Diff line change @@ -21,4 +21,9 @@ namespace mlx
21
21
});
22
22
return (it != m_fonts_registry.end () ? *it : nullptr );
23
23
}
24
+
25
+ void FontRegistry::Reset ()
26
+ {
27
+ m_fonts_registry.clear ();
28
+ }
24
29
}
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ namespace mlx
103
103
window.reset ();
104
104
}
105
105
106
+ m_font_registry.Reset ();
106
107
p_render_core.reset ();
107
108
p_sdl_manager.reset ();
108
109
#ifdef PROFILER
You can’t perform that action at this time.
0 commit comments