mirror of
https://github.com/labwc/labwc.git
synced 2026-02-23 01:40:18 -05:00
common/font: add scaled_font_buffer_create_for_titlebar()
Co-authored-by: tokyo4j <hrak1529@gmail.com>
This commit is contained in:
parent
3ca7adace0
commit
54b236e027
4 changed files with 76 additions and 18 deletions
|
|
@ -1,6 +1,8 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef LABWC_FONT_H
|
||||
#define LABWC_FONT_H
|
||||
|
||||
#include <cairo.h>
|
||||
#include <pango/pango-font.h>
|
||||
|
||||
struct lab_data_buffer;
|
||||
|
|
@ -36,14 +38,15 @@ void font_get_buffer_size(int max_width, const char *text, struct font *font,
|
|||
* font_buffer_create - Create ARGB8888 lab_data_buffer using pango
|
||||
* @buffer: buffer pointer
|
||||
* @max_width: max allowable width; will be ellipsized if longer
|
||||
* @height: buffer height or -1 to compute from font
|
||||
* @text: text to be generated as texture
|
||||
* @font: font description
|
||||
* @color: foreground color in rgba format
|
||||
* @bg_color: background color in rgba format
|
||||
* @bg_pattern: background pattern
|
||||
*/
|
||||
void font_buffer_create(struct lab_data_buffer **buffer, int max_width,
|
||||
const char *text, struct font *font, const float *color,
|
||||
const float *bg_color, double scale);
|
||||
int height, const char *text, struct font *font, const float *color,
|
||||
cairo_pattern_t *bg_pattern, double scale);
|
||||
|
||||
/**
|
||||
* font_finish - free some font related resources
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue