After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 418605 - Change power statistics label rendering to use pangocairo
Change power statistics label rendering to use pangocairo
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-statistics
2.18.x
Other All
: Normal enhancement
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
: 398368 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-03-15 15:21 UTC by Young-Ho Cha
Modified: 2007-05-03 21:49 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
set font face that translatable in graph widget (916 bytes, patch)
2007-03-15 15:24 UTC, Young-Ho Cha
none Details | Review
Patch for statistics label rendering to use pangocairo against 2-18 (13.18 KB, patch)
2007-03-15 18:05 UTC, Young-Ho Cha
none Details | Review
Patch for statistics label rendering to use pangocairo against 2-18 (13.27 KB, patch)
2007-03-17 07:11 UTC, Young-Ho Cha
none Details | Review

Description Young-Ho Cha 2007-03-15 15:21:26 UTC
Please describe the problem:
Power statistics label glyphes are broken in non-english locale.

Steps to reproduce:
1. run gnome-power-statistics in other locale


Actual results:
show like this
http://ftp.mizi.com/~ganadist/gph-ko.png


Expected results:
show like this
http://ftp.mizi.com/~ganadist/gph-ko-patched.png

Does this happen every time?
yes

Other information:
It doesn't specified font face in drawing text.

It must change font face in other locale.

I'll attach a patch.
Comment 1 Young-Ho Cha 2007-03-15 15:24:47 UTC
Created attachment 84657 [details] [review]
set font face that translatable in graph widget

This is a patch for gpm 2.18 branch.

But it need more works such as using pangocairo for next major release.
Comment 2 Young-Ho Cha 2007-03-15 15:48:15 UTC
I found this problem happen in Ubuntu distribution only.

It seems this problem caused ubuntu locale selector.

So this is not a bug.

But I'll change Severity to enhancement, to rework with pangocairo 
Comment 3 Richard Hughes 2007-03-15 16:50:17 UTC
Yes, I can reproduce this too. I'll test your patch tonight with different languages, and merge to 2-18 and trunk. If you could work on a pangocairo patch you would be a legend. Thanks.
Comment 4 Young-Ho Cha 2007-03-15 18:05:08 UTC
Created attachment 84666 [details] [review]
Patch for statistics label rendering to use pangocairo against 2-18

I changed to use pangocairo for render text in graph.

My desktop has no battery, so It might be needed to adjust y-offset in graph.
Comment 5 Richard Hughes 2007-03-15 22:20:40 UTC
I've added your first patch to 2-18, thanks;

2007-03-15  Richard Hughes  <richard@hughsie.com>

	* src/gpm-graph-widget.c: (gpm_graph_widget_draw_labels),
	(gpm_graph_widget_legend_calculate_size),
	(gpm_graph_widget_draw_graph):
	Set font face that translatable in graph widget.
	Patch from Young-Ho Cha, many thanks. The other patch in bugzilla
	adds pango support, and we should play with it on trunk and then
	backport it if it proves stable. Fixes #418605

The pango stuff I want to play with on trunk, and then we can look at backporting it. Thanks for doing this, it's appreciated.

Richard.
Comment 6 Young-Ho Cha 2007-03-17 07:11:54 UTC
Created attachment 84755 [details] [review]
Patch for statistics label rendering to use pangocairo against 2-18

I update a patch. Changes are...
 adjusted font size
 adjusted label offset

Here are two screenshots that before applied, and applied patch.
http://ftp.mizi.com/~ganadist/gpm-cairo.png (before)
http://ftp.mizi.com/~ganadist/gpm-pangocairo.png (after)
Comment 7 Richard Hughes 2007-04-09 21:16:55 UTC
*** Bug 398368 has been marked as a duplicate of this bug. ***
Comment 8 Richard Hughes 2007-05-03 21:49:44 UTC
2007-05-03  Richard Hughes  <richard@hughsie.com>

* src/gpm-graph-widget.c:
  Convert gnome-power-statistics to use Pango for text rendering.
  This is based heavily on a patch by Young-Ho Cha <ganadist@chollian.net>
  and fixes #418605. Many thanks.

Please can you check TRUNK and make sure that this is fixed. Thanks for your help with this.