GNOME Bugzilla – Bug 680663
Font dpi
Last modified: 2012-08-02 11:21:06 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
Created attachment 219698 [details] Fedora 17 64 bits running sugar-build inside a VNC
Created attachment 219699 [details] Running XO 1.5 os18
Created attachment 219700 [details] Running XO 1.5 os18
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,