SOURCES: bless-glyphs_overlap.patch (NEW), bless-buildfixes.patch ...

maciek2w maciek2w at pld-linux.org
Thu Sep 21 17:43:41 CEST 2006


Author: maciek2w                     Date: Thu Sep 21 15:43:41 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- updated to 0.4.1
- fixed glyphs overlapping (patch based on https://gna.org/bugs/?6158)
- removed already applied bless-buildfixes.patch

---- Files affected:
SOURCES:
   bless-glyphs_overlap.patch (NONE -> 1.1)  (NEW), bless-buildfixes.patch (1.1 -> NONE)  (REMOVED)

---- Diffs:

================================================================
Index: SOURCES/bless-glyphs_overlap.patch
diff -u /dev/null SOURCES/bless-glyphs_overlap.patch:1.1
--- /dev/null	Thu Sep 21 17:43:41 2006
+++ SOURCES/bless-glyphs_overlap.patch	Thu Sep 21 17:43:36 2006
@@ -0,0 +1,30 @@
+--- bless-0.4.1/src/gui/drawers/Drawer.cs.orig	2006-09-21 17:31:58.000000000 +0200
++++ bless-0.4.1/src/gui/drawers/Drawer.cs	2006-09-21 17:33:33.000000000 +0200
+@@ -179,20 +179,13 @@
+ 		Pango.Context pangoCtx=widget.PangoContext;
+ 		Pango.FontMetrics fm=pangoCtx.GetMetrics(fontDescription, lang);
+ 		
+-		// set the font height and width
+-		height =(int)( (fm.Ascent+fm.Descent)/Pango.Scale.PangoScale);
+-		width =(int) ((fm.ApproximateCharWidth)/Pango.Scale.PangoScale);
+-		
+-		// temporary workaround for font width problem
+-		int fontWidthFix;
+-		try {
+-			 fontWidthFix = Convert.ToInt32(Preferences.Instance["FontWidthFix"]);
+-		}
+-		catch (Exception e) {
+-			fontWidthFix = 0;
+-		}
+-		
+-		width += fontWidthFix;
++		// set the font height and width		
++		// BUGFIX:
++		Pango.Layout layout = new Pango.Layout(pangoCtx);
++		layout.FontDescription = fontDescription;
++		layout.SetText("A"); // check for a single character
++		layout.GetPixelSize(out width, out height);
++		// END OF FIX
+ 		
+ 		// create the font pixmaps
+ 		InitializePixmaps();
================================================================


More information about the pld-cvs-commit mailing list