Ticket #3436 (closed defect: fixed)

Opened 14 months ago

Last modified 6 weeks ago

Fototoon: font size is wrong in xo

Reported by: godiard Owned by: humitos
Priority: Unspecified by Maintainer Milestone: Unspecified by Release Team
Component: FotoToon Version: Unspecified
Severity: Unspecified Keywords: 12.2.0, patch
Cc: humitos, godiard Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

The font size in the xo is not consistent with the font size in other activities, like Paint or Write. Probably need calculate the size according to dpi.

If we change it, need check we not break files created with older Fototoon versions, then we should try recalculate the old values. The file format have a version, we need check the version and recalculate if needed.

Attachments

0001-Use-pango-to-handle-fonts-SL-3436.patch Download (15.9 KB) - added by humitos 12 months ago.
Patch to manage fonts with pango
0001-Use-pango-to-handle-fonts-SL-3436.2.patch Download (16.1 KB) - added by humitos 10 months ago.

Change History

Changed 13 months ago by godiard

  • keywords 12.1.0 added

Changed 12 months ago by humitos

  • cc humitos added

Changed 12 months ago by humitos

I tried changing the resolution in the pangocairo.CairoFontMap but it didn't work: historyactivity.py

import pangocairo
font_map_default = pangocairo.cairo_font_map_get_default()
font_map_default.set_resolution(200)

Changed 12 months ago by humitos

  • owner changed from godiard to humitos
  • status changed from new to accepted

Changed 12 months ago by humitos

Patch to manage fonts with pango

Changed 12 months ago by humitos

  • keywords 12.1.0, patch added; 12.1.0 removed

I've just uploaded a patch that change the way that fonts are managed. This is because " cairo fonts are not designed to be used in production" and besides we need to set the DPI font depending on the screen that the activity is running.

For example, in my Desktop PC a value of 95 DPI is used and in the XO a value of 200 DPI is used. Those values are taken from gtk.settings_get_default().get_property('gtk-xft-dpi') but there is a problem with this: a value of 200 is too big for the XO display so the font is shown too big. This value should be near to 170 / 175 (I got this value comparing the 12 points font size in Write activity with the 12 points font size in FotoToon activity)

On the other hand, there are some regression issues with this patch. They are mentioned on the commit message as well:

  • 'Up' and 'Down' keys do not work to move between text lines
  • The user's cursor is not shown when a globe text is being edited
  • The ability to expand just vertically the globe doesn't work

So, I'm not sure what I should do with this patch (apply or not until the regression issues were fixed) and how to solve the DPI issue.

Changed 12 months ago by godiard

  • keywords 12.2.0, added; 12.1.0, removed

The change needed is bigger than what we can do for 12.1.0

Moved to 12.2.0.

Changed 10 months ago by humitos

Well, the "magic number" here is 133 for the DPI.

I got this number after a talk with Martin Langhoff while I was porting Typing Turtle and it's related with the XO's Display

Changed 10 months ago by humitos

Changed 10 months ago by humitos

  • cc godiard added

This new patch solves the issue related with the DPI fonts on the XO

Changed 6 weeks ago by godiard

  • status changed from accepted to closed
  • resolution set to fixed

Fixed in Fototoon 14

Note: See TracTickets for help on using tickets.