st: Remove our own font DPI resolution implementation
Clutter has had clutter_backend_get_resolution for a little while. https://bugzilla.gnome.org/show_bug.cgi?id=672807
This commit is contained in:
@ -820,7 +820,7 @@ get_length_from_term (StThemeNode *node,
|
||||
break;
|
||||
case POINTS:
|
||||
{
|
||||
double resolution = st_theme_context_get_resolution (node->context);
|
||||
double resolution = clutter_backend_get_resolution (clutter_get_default_backend ());
|
||||
*length = num->val * multiplier * (resolution / 72.);
|
||||
}
|
||||
break;
|
||||
@ -842,7 +842,7 @@ get_length_from_term (StThemeNode *node,
|
||||
}
|
||||
else
|
||||
{
|
||||
double resolution = st_theme_context_get_resolution (node->context);
|
||||
double resolution = clutter_backend_get_resolution (clutter_get_default_backend ());
|
||||
*length = num->val * multiplier * (resolution / 72.) * font_size;
|
||||
}
|
||||
}
|
||||
@ -2139,7 +2139,7 @@ font_size_from_term (StThemeNode *node,
|
||||
{
|
||||
if (term->type == TERM_IDENT)
|
||||
{
|
||||
double resolution = st_theme_context_get_resolution (node->context);
|
||||
double resolution = clutter_backend_get_resolution (clutter_get_default_backend ());
|
||||
/* We work in integers to avoid double comparisons when converting back
|
||||
* from a size in pixels to a logical size.
|
||||
*/
|
||||
@ -2346,7 +2346,7 @@ st_theme_node_get_font (StThemeNode *node)
|
||||
parent_size = pango_font_description_get_size (node->font_desc);
|
||||
if (!pango_font_description_get_size_is_absolute (node->font_desc))
|
||||
{
|
||||
double resolution = st_theme_context_get_resolution (node->context);
|
||||
double resolution = clutter_backend_get_resolution (clutter_get_default_backend ());
|
||||
parent_size *= (resolution / 72.);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user