Remove unused function scaled_font_buffer_set_max_width()

This commit is contained in:
Johan Malm 2025-09-25 19:25:51 +01:00 committed by John Lindgren
parent 6bbdc3c6dc
commit 0bf2678f9d
2 changed files with 0 additions and 22 deletions

View file

@ -73,12 +73,4 @@ void scaled_font_buffer_update(struct scaled_font_buffer *self, const char *text
int max_width, struct font *font, const float *color,
const float *bg_color);
/**
* Update the max width of an existing auto scaling font buffer
* and force a new render.
*
* No steps are taken to detect if its actually required to render a new buffer.
*/
void scaled_font_buffer_set_max_width(struct scaled_font_buffer *self, int max_width);
#endif /* LABWC_SCALED_FONT_BUFFER_H */

View file

@ -139,17 +139,3 @@ scaled_font_buffer_update(struct scaled_font_buffer *self, const char *text,
scaled_buffer_request_update(self->scaled_buffer,
self->width, self->height);
}
void
scaled_font_buffer_set_max_width(struct scaled_font_buffer *self, int max_width)
{
self->max_width = max_width;
int computed_height;
font_get_buffer_size(self->max_width, self->text, &self->font,
&self->width, &computed_height);
self->height = (self->fixed_height > 0) ?
self->fixed_height : computed_height;
scaled_buffer_request_update(self->scaled_buffer,
self->width, self->height);
}