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 656864 - [Indic] Rendering broken on 'Benchmark' Window
[Indic] Rendering broken on 'Benchmark' Window
Status: RESOLVED FIXED
Product: gnome-disk-utility
Classification: Core
Component: general
3.16.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-disk-utility-maint
gnome-disk-utility-maint
Depends on:
Blocks:
 
 
Reported: 2011-08-19 06:28 UTC by A S Alam
Modified: 2015-06-03 18:01 UTC
See Also:
GNOME target: ---
GNOME version: 3.1/3.2


Attachments
screenshot of issue (54.90 KB, image/png)
2011-08-19 06:28 UTC, A S Alam
  Details
use pango instead of cairo (4.53 KB, patch)
2015-06-02 10:42 UTC, David King
accepted-commit_now Details | Review
use current font size in calculation (4.53 KB, patch)
2015-06-03 16:38 UTC, David King
none Details | Review
use current font size in calculation (4.69 KB, patch)
2015-06-03 16:39 UTC, David King
accepted-commit_now Details | Review

Description A S Alam 2011-08-19 06:28:37 UTC
Created attachment 194184 [details]
screenshot of issue

Description of problem:
While using application in Punjabi (pa_IN), I found some square box, which is
most probably i18n issue (translation is ok as render ok other places in
application). Bug seems similar to 

Version-Release number of selected component (if applicable):
gnome-disk-utility-3.0.2-3.fc16.x86_64

How reproducible:
100%

Steps to Reproduce:
1. run application in Indic locale (pa_IN/hi_IN)
2. select disk and click on Benchmark
3.

Actual results:
Rendering Broken on both side of graph (check screenshot for detail)

Expected results:
should work as in english locale

Additional info:
same as Bug https://bugzilla.redhat.com/show_bug.cgi?id=560336
Comment 1 David Zeuthen (not reading bugmail) 2012-11-15 17:30:18 UTC
As of gnome-disk-utility 3.4 everything was rewritten to use udisks2 and GDBus. Since this bug is for an old version, closing with resolution OBSOLETE.

Thanks for taking the time to report this bug.
However, you are using a version that is too old and not supported anymore. GNOME developers are no longer working on that version, so unfortunately there will not be any bug fixes for the version that you use.

By upgrading to a newer version of GNOME you could receive bug fixes and new functionality. You may need to upgrade your Linux distribution to obtain a newer version of GNOME.
Please feel free to reopen this bug if the problem still occurs with a newer version of GNOME.
Comment 2 Akira TAGOH 2015-06-02 02:57:56 UTC
Unfortunately this seems still persists with gnome-disk-utility-3.16.1. the font being used for rendering is Lohit Gurmukhi though, it doesn't have full ASCII coverage. usually it isn't a problem on pango so that pango chooses appropriate fallback if it doesn't satisfy the coverage to render. but gnome-disks drives cairo directly to render the benchmark graph. then this issue appears.
Comment 3 David King 2015-06-02 10:42:22 UTC
Created attachment 304422 [details] [review]
use pango instead of cairo

I tested with LANG=pa_IN gnome-disks with the attached patch and the benchmark dialog looks fine to me.
Comment 4 Akira TAGOH 2015-06-03 01:55:52 UTC
Yes, that looks good to me too. thanks!
Comment 5 Michael Catanzaro 2015-06-03 14:08:28 UTC
Review of attachment 304422 [details] [review]:

::: src/disks/gdubenchmarkdialog.c
@@ +418,3 @@
+                         &font_desc,
+                         NULL);
+  pango_font_description_set_size (font_desc, 0.8 * 8 * PANGO_SCALE);

Where do the constants come from? I see the 8 is the font size that was passed to cairo previously, but not sure what the 0.8 is for.
Comment 6 David King 2015-06-03 16:38:50 UTC
Created attachment 304535 [details] [review]
use current font size in calculation

The 0.8 is equivalent to the 8 that was previously passed to cairo_set_font_size (as it is a factor, with the default font "size" being 10). The 8 * PANGO_SCALE is the font size in points. I was looking at similar code in gnome-system-monitor which hard-codes an 8-point size, then scales it by 0.8, as the source of the 8 * PANGO_SCALE. A better approach may be to use PANGO_SCALE_X_SMALL with the current font size, which gives an identical (with the default font size in GNOME of 11 points) result. The attached patch does this.
Comment 7 David King 2015-06-03 16:39:49 UTC
Created attachment 304536 [details] [review]
use current font size in calculation

Whoops, really update the patch this time.
Comment 8 David King 2015-06-03 18:01:08 UTC
Review of attachment 304536 [details] [review]:

Pushed to master and gnome-3-16 branches as commit cc5f2cf910806c2fee9d56231fb5fe271ed5f44e and commit 6cf5a8616cd0f339f803c2a6de29b26d980bceef.