Ticket #6644 (new defect)

Opened 7 years ago

Last modified 6 years ago

Hardcoded font name in sugar.graphics.style

Reported by: khaled Owned by: marco
Priority: normal Milestone: 9.1.0-cancelled
Component: sugar Version:
Keywords: r- Cc: Eben
Action Needed: communicate Verified: no
Deployments affected: Blocked By:
Blocking:

Description

Font name is hardcoded in sugar.graphics.style module as 'Bitstream Vera Sans', making it necessary to change the source to use another font (we don't even have "Bitstream Vera" in the builds). It should get font name from gtk settings instead.

The attached patch fixes this, and fixes a (introduced?) bug when the result of "zoom(36) - FONT_NORMAL_H - _FOCUS_LINE_WIDTH" is a negative value (some fonts, especially Arabic fonts, have higher font hight value), I don't know why "36", so I made it "FONT_NORMAL_H+12" which equals 36 for the default sugar font.

Attachments

style.2.diff (1.4 kB) - added by khaled 6 years ago.
style.diff (1.4 kB) - added by khaled 6 years ago.

Change History

Changed 6 years ago by khaled

Changed 6 years ago by khaled

Changed 6 years ago by marco

  • keywords 8.2.0:+ added
  • milestone changed from Never Assigned to 8.2.0 (was Update.2)

Changed 6 years ago by marco

  • keywords 8.2.0:+ removed
  • next_action set to never set

Changed 6 years ago by marco

  • keywords r? added
  • next_action changed from never set to review

Changed 6 years ago by marco

  • cc Eben added
  • keywords r- added; r? removed

A couple of things:

  • Let's use a FONT_FAMILY constant. This code is always executed at activity startup (I'm not sure if it would have any noticable impact, but it surely doesn't hurt).
  • The 36 is the height the design theme wants for that control. Eben, to me this seems to be another proof that trying to get to "fixed" dimensions doesn't make sense. How do you want to deal with it? We should probably chat about it...

Changed 6 years ago by marco

  • next_action changed from review to communicate

Changed 6 years ago by marco

  • milestone changed from 8.2.0 (was Update.2) to 9.1.0

Punting Arabic related tickets to 9.1. If a decision is made that we need to support it, please reassign all the tracker bug tickets to 8.2.

Note: See TracTickets for help on using tickets.