]> git.sur5r.net Git - glabels/blobdiff - src/label-text.c
Imported Upstream version 3.0.1
[glabels] / src / label-text.c
index d9146c420aaa35c413ccd1c0dd5c01884a2ebc2b..c595f9ce378dcb25152b79c87f4e433d83650826 100644 (file)
@@ -521,6 +521,7 @@ get_size (glLabelObject *object,
        context = pango_cairo_font_map_create_context (PANGO_CAIRO_FONT_MAP (fontmap));
        options = cairo_font_options_create ();
         cairo_font_options_set_hint_style (options, CAIRO_HINT_STYLE_NONE);
+        cairo_font_options_set_hint_metrics (options, CAIRO_HINT_METRICS_OFF);
        pango_cairo_context_set_font_options (context, options);
        cairo_font_options_destroy (options);
 
@@ -1050,13 +1051,13 @@ set_text_path (glLabelText      *this,
 
         style = this->priv->font_italic_flag ? PANGO_STYLE_ITALIC : PANGO_STYLE_NORMAL;
 
-        font_size   = this->priv->font_size;
+        font_size   = this->priv->font_size * FONT_SCALE;
         auto_shrink = gl_label_text_get_auto_shrink (this);
         if (!screen_flag && record && auto_shrink && (raw_w != 0.0))
         {
                 font_size = auto_shrink_font_size (cr,
                                                    this->priv->font_family,
-                                                   this->priv->font_size * FONT_SCALE,
+                                                   font_size,
                                                    this->priv->font_weight,
                                                    style,
                                                    text,
@@ -1068,6 +1069,7 @@ set_text_path (glLabelText      *this,
 
         font_options = cairo_font_options_create ();
         cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_NONE);
+        cairo_font_options_set_hint_metrics (font_options, CAIRO_HINT_METRICS_OFF);
         context = pango_layout_get_context (layout);
         pango_cairo_context_set_font_options (context, font_options);
         cairo_font_options_destroy (font_options);
@@ -1075,7 +1077,7 @@ set_text_path (glLabelText      *this,
         desc = pango_font_description_new ();
         pango_font_description_set_family (desc, this->priv->font_family);
         pango_font_description_set_weight (desc, this->priv->font_weight);
-        pango_font_description_set_size   (desc, font_size * FONT_SCALE * PANGO_SCALE);
+        pango_font_description_set_size   (desc, font_size * PANGO_SCALE);
         pango_font_description_set_style  (desc, style);
         pango_layout_set_font_description (layout, desc);
         pango_font_description_free       (desc);