[longomatch] Fix function to measure text size



commit cba715ab9defb3dcad8811f1b347858047105879
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Tue Oct 21 01:50:11 2014 +0200

    Fix function to measure text size

 .../Gui/Component/Stats/PangoTextMeasurer.cs       |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/Stats/PangoTextMeasurer.cs 
b/LongoMatch.GUI/Gui/Component/Stats/PangoTextMeasurer.cs
index a085a23..9ab9986 100644
--- a/LongoMatch.GUI/Gui/Component/Stats/PangoTextMeasurer.cs
+++ b/LongoMatch.GUI/Gui/Component/Stats/PangoTextMeasurer.cs
@@ -37,8 +37,9 @@ namespace LongoMatch.Gui.Component.Stats
                        int width, height;
                        
                        desc.Family = fontFamily;
-                       desc.Size = (int) fontSize;
+                       desc.Size = Pango.Units.FromPixels ((int) fontSize);
                        desc.Weight = PangoWeightFromDouble (fontWeight);
+                       layout.FontDescription = desc;
                        layout.SetMarkup (GLib.Markup.EscapeText (text));
                        layout.GetPixelSize (out width, out height);
                        size.Width = (double) width;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]