mirror of
https://github.com/labwc/labwc.git
synced 2026-04-12 08:21:13 -04:00
[dirty] use pango_font_description_from_string
This commit is contained in:
parent
3427783a1a
commit
8399df2ea8
1 changed files with 7 additions and 3 deletions
|
|
@ -14,9 +14,13 @@
|
||||||
PangoFontDescription *
|
PangoFontDescription *
|
||||||
font_to_pango_desc(struct font *font)
|
font_to_pango_desc(struct font *font)
|
||||||
{
|
{
|
||||||
PangoFontDescription *desc = pango_font_description_new();
|
char buf[4096];
|
||||||
pango_font_description_set_family(desc, font->name);
|
snprintf(buf, sizeof(buf), "%s %d", font->name, font->size * PANGO_SCALE);
|
||||||
pango_font_description_set_size(desc, font->size * PANGO_SCALE);
|
PangoFontDescription *desc = pango_font_description_from_string(buf);
|
||||||
|
wlr_log(WLR_ERROR, "got desc for %s: %p", buf, desc);
|
||||||
|
//PangoFontDescription *desc = pango_font_description_new();
|
||||||
|
//pango_font_description_set_family(desc, font->name);
|
||||||
|
//pango_font_description_set_size(desc, font->size * PANGO_SCALE);
|
||||||
if (font->slant == FONT_SLANT_ITALIC) {
|
if (font->slant == FONT_SLANT_ITALIC) {
|
||||||
pango_font_description_set_style(desc, PANGO_STYLE_ITALIC);
|
pango_font_description_set_style(desc, PANGO_STYLE_ITALIC);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue