Opened 7 years ago

Last modified 6 years ago

#6644 new defect

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
Blocked By: Blocking:
Deployments affected: Action Needed: communicate
Verified: no

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 (2)

style.2.diff (1.4 KB) - added by khaled 7 years ago.
style.diff (1.4 KB) - added by khaled 7 years ago.

Download all attachments as: .zip

Change History (8)

Changed 7 years ago by khaled

Changed 7 years ago by khaled

comment:1 Changed 6 years ago by marco

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

comment:2 Changed 6 years ago by marco

  • Action Needed set to never set
  • Keywords 8.2.0:+ removed

comment:3 Changed 6 years ago by marco

  • Action Needed changed from never set to review
  • Keywords r? added

comment:4 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...

comment:5 Changed 6 years ago by marco

  • Action Needed changed from review to communicate

comment:6 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.