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 680663 - Font dpi
Font dpi
Status: RESOLVED INVALID
Product: pango
Classification: Platform
Component: cairo
unspecified
Other Linux
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2012-07-26 15:47 UTC by Manuel Kaufmann
Modified: 2012-08-02 11:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fedora 17 64 bits running sugar-build inside a VNC (222.56 KB, image/png)
2012-07-26 15:47 UTC, Manuel Kaufmann
Details
Fedora 17 64 bits running sugar-build inside a VNC (85.04 KB, image/png)
2012-07-26 15:47 UTC, Manuel Kaufmann
Details
Running XO 1.5 os18 (74.70 KB, image/png)
2012-07-26 15:48 UTC, Manuel Kaufmann
Details
Running XO 1.5 os18 (38.28 KB, image/png)
2012-07-26 15:48 UTC, Manuel Kaufmann
Details

Description Manuel Kaufmann 2012-07-26 15:47:23 UTC
Created attachment 219697 [details]
Fedora 17 64 bits running sugar-build inside a VNC

Hello,

I'm writing here because I'm not sure which is the right place to comment this. Actually, I'm not sure if this is bug or not. I'm confused, so I will try to give as much information as I can. 

I'm working on the activity Typing Turtle[1] from the OLPC project. This activity is written using gtk2 and standard "graphics context"[2] from it.

I ported (see the patch[3]) it from that standard graphics context to Cairo, using PangoCairo to draw on the Cairo context. This is already ported and it's working properly but the problem that I have is related with Pango font sizes, specifically with "Monospace".

I'm testing this patch on my XO that has a display with 200dpi[4] and on my Desktop (using Fedora 17 64 bits) that it has 96dpi (I think -I'm not sure how to test this).

So, the thing is, on my Desktop I can see the fonts with the correct sizes but in the XO the "Monospace" font is bigger than the rest of the things in the screen (proportionally). I don't have this issue with the rest of the fonts.

I'm attaching some screenshots that show this behaviour.

By the way, I'm using this chunk of code to set the DPI of the display when the activity starts:

  import pangocairo
  def _get_screen_dpi():
      xft_dpi = gtk.settings_get_default().get_property('gtk-xft-dpi')
      dpi = float(xft_dpi / 1024)
      logging.debug('Setting dpi to: %f', dpi)
      return dpi

  dpi = _get_screen_dpi()
  font_map_default = pangocairo.cairo_font_map_get_default()
  font_map_default.set_resolution(dpi)

Please, let me know if there something that is missing.

[1] http://git.sugarlabs.org/typing-turtle
[2] http://www.pygtk.org/docs/pygtk/class-gdkgc.html
[3] http://bugs.sugarlabs.org/attachment/ticket/3772/0001-Port-to-Cairo.patch
[4] http://wiki.laptop.org/go/Display#Quick_Summary
Comment 1 Manuel Kaufmann 2012-07-26 15:47:53 UTC
Created attachment 219698 [details]
Fedora 17 64 bits running sugar-build inside a VNC
Comment 2 Manuel Kaufmann 2012-07-26 15:48:35 UTC
Created attachment 219699 [details]
Running XO 1.5 os18
Comment 3 Manuel Kaufmann 2012-07-26 15:48:49 UTC
Created attachment 219700 [details]
Running XO 1.5 os18
Comment 4 Manuel Kaufmann 2012-08-02 11:21:06 UTC
Well, after talking with the Dev-Team we found that there is no problem at all on the library. In fact, the problem is that the DPI of the XO should be set as 133 because of its display and how it works:

 * http://wiki.laptop.org/go/Display

I'm closing this issue as invalid. Thanks,