@@ -68,7 +68,7 @@ float ekg::draw::font_renderer::get_text_width(std::string_view text, int32_t &l
6868 break_text = char8 == ' \n ' ;
6969 if (break_text || (r_n_break_text = (char8 == ' \r ' && it < text_size && text.at (it + 1 ) == ' \n ' ))) {
7070 it += static_cast <uint64_t >(r_n_break_text);
71- largest_text_width = ekg::min_clamp (largest_text_width, text_width);
71+ largest_text_width = ekg::clamp_min (largest_text_width, text_width);
7272 text_width = 0 .0f ;
7373 lines_count++;
7474 continue ;
@@ -115,8 +115,8 @@ float ekg::draw::font_renderer::get_text_width(std::string_view text, int32_t &l
115115 text_width += this ->mapped_glyph_char_data [char32].wsize ;
116116 }
117117
118- lines = ekg::min_clamp (lines, lines_count);
119- largest_text_width = ekg::min_clamp (largest_text_width, text_width);
118+ lines = ekg::clamp_min (lines, lines_count);
119+ largest_text_width = ekg::clamp_min (largest_text_width, text_width);
120120
121121 return largest_text_width;
122122}
@@ -157,7 +157,7 @@ float ekg::draw::font_renderer::get_text_width(std::string_view text) {
157157 break_text = char8 == ' \n ' ;
158158 if (break_text || (r_n_break_text = (char8 == ' \r ' && it < text_size && text.at (it + 1 ) == ' \n ' ))) {
159159 it += static_cast <uint64_t >(r_n_break_text);
160- largest_text_width = ekg::min_clamp (largest_text_width, text_width);
160+ largest_text_width = ekg::clamp_min (largest_text_width, text_width);
161161 text_width = 0 .0f ;
162162 continue ;
163163 }
@@ -203,7 +203,7 @@ float ekg::draw::font_renderer::get_text_width(std::string_view text) {
203203 text_width += char_data.wsize ;
204204 }
205205
206- largest_text_width = ekg::min_clamp (largest_text_width, text_width);
206+ largest_text_width = ekg::clamp_min (largest_text_width, text_width);
207207 return largest_text_width;
208208}
209209
@@ -339,14 +339,14 @@ void ekg::draw::font_renderer::reload() {
339339 char_data.wsize = static_cast <float >(static_cast <int32_t >(ft_glyph_slot->advance .x >> 6 ));
340340
341341 this ->atlas_rect .w += static_cast <int32_t >(char_data.w );
342- this ->atlas_rect .h = ekg::min_clamp <int32_t >(this ->atlas_rect .h , static_cast <int32_t >(char_data.h ));
342+ this ->atlas_rect .h = ekg::clamp_min <int32_t >(this ->atlas_rect .h , static_cast <int32_t >(char_data.h ));
343343
344- p_font_face_picked->highest_glyph_size .x = ekg::min_clamp (
344+ p_font_face_picked->highest_glyph_size .x = ekg::clamp_min (
345345 static_cast <int32_t >(p_font_face_picked->highest_glyph_size .x ),
346346 static_cast <int32_t >(char_data.w )
347347 );
348348
349- p_font_face_picked->highest_glyph_size .y = ekg::min_clamp (
349+ p_font_face_picked->highest_glyph_size .y = ekg::clamp_min (
350350 static_cast <int32_t >(p_font_face_picked->highest_glyph_size .y ),
351351 static_cast <int32_t >(char_data.h )
352352 );
0 commit comments