]> git.pld-linux.org Git - packages/bless.git/blame - bless-glyphs_overlap.patch
- updated to 0.4.1
[packages/bless.git] / bless-glyphs_overlap.patch
CommitLineData
158e8e5c 1--- bless-0.4.1/src/gui/drawers/Drawer.cs.orig 2006-09-21 17:31:58.000000000 +0200
2+++ bless-0.4.1/src/gui/drawers/Drawer.cs 2006-09-21 17:33:33.000000000 +0200
3@@ -179,20 +179,13 @@
4 Pango.Context pangoCtx=widget.PangoContext;
5 Pango.FontMetrics fm=pangoCtx.GetMetrics(fontDescription, lang);
6
7- // set the font height and width
8- height =(int)( (fm.Ascent+fm.Descent)/Pango.Scale.PangoScale);
9- width =(int) ((fm.ApproximateCharWidth)/Pango.Scale.PangoScale);
10-
11- // temporary workaround for font width problem
12- int fontWidthFix;
13- try {
14- fontWidthFix = Convert.ToInt32(Preferences.Instance["FontWidthFix"]);
15- }
16- catch (Exception e) {
17- fontWidthFix = 0;
18- }
19-
20- width += fontWidthFix;
21+ // set the font height and width
22+ // BUGFIX:
23+ Pango.Layout layout = new Pango.Layout(pangoCtx);
24+ layout.FontDescription = fontDescription;
25+ layout.SetText("A"); // check for a single character
26+ layout.GetPixelSize(out width, out height);
27+ // END OF FIX
28
29 // create the font pixmaps
30 InitializePixmaps();
This page took 0.030396 seconds and 4 git commands to generate.