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 */
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);
-}