mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
font: use PangoStyle enum
This commit is contained in:
parent
94ead35227
commit
58d22d05e2
3 changed files with 6 additions and 17 deletions
|
|
@ -17,12 +17,7 @@ font_to_pango_desc(struct font *font)
|
|||
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) {
|
||||
pango_font_description_set_style(desc, PANGO_STYLE_ITALIC);
|
||||
}
|
||||
if (font->slant == FONT_SLANT_OBLIQUE) {
|
||||
pango_font_description_set_style(desc, PANGO_STYLE_OBLIQUE);
|
||||
}
|
||||
pango_font_description_set_style(desc, font->slant);
|
||||
pango_font_description_set_weight(desc, font->weight);
|
||||
return desc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue