Commit 9da90151 authored by Andre Miranda's avatar Andre Miranda

Fix font size (#30)

pango_font_description_get_size is in points (or device units), not
pixels.
parent bb7bca38
Pipeline #3156 passed with stages
in 48 seconds
......@@ -345,7 +345,7 @@ static void datetime_update_date_font(t_datetime *datetime)
font = pango_font_description_from_string(datetime->date_font);
if (G_LIKELY (font))
{
css = g_strdup_printf("label { font-family: %s; font-size: %dpx; font-style: %s; font-weight: %s }",
css = g_strdup_printf("label { font-family: %s; font-size: %dpt; font-style: %s; font-weight: %s }",
pango_font_description_get_family (font),
pango_font_description_get_size (font) / PANGO_SCALE,
(pango_font_description_get_style(font) == PANGO_STYLE_ITALIC ||
......@@ -390,7 +390,7 @@ static void datetime_update_time_font(t_datetime *datetime)
font = pango_font_description_from_string(datetime->time_font);
if (G_LIKELY (font))
{
css = g_strdup_printf("label { font-family: %s; font-size: %dpx; font-style: %s; font-weight: %s }",
css = g_strdup_printf("label { font-family: %s; font-size: %dpt; font-style: %s; font-weight: %s }",
pango_font_description_get_family (font),
pango_font_description_get_size (font) / PANGO_SCALE,
(pango_font_description_get_style(font) == PANGO_STYLE_ITALIC ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment