notify-osd seems to be unable to use some of the fonts

Bug #396736 reported by R4kk00n
114
This bug affects 19 people
Affects Status Importance Assigned to Milestone
notify-osd (Ubuntu)
Fix Released
Low
Mirco Müller

Bug Description

Binary package hint: notify-osd

With some of the fonts set as an "application font" via System -> Preferences -> Appearance notification pop-ups are displayed with Deja Vu Sans Book (i.e. the default system font).
Though they are meant to be displayed with the "application font".

I've attached two screenshots of a correct behaviour (with Droid Serif) and an incorrect one (with URW Bookman L).
(Not that I would use serif fonts for UI — it's just to make the difference more noticeable.)

I've chosen two fonts available in the repository to insure that this behaviour is not a result of an incorrect manual font installation. But it is reproducible with fonts just dropped in /usr/share/fonts/truetype folder: for instance, Segoe UI or Lucida Sans Unicode work OK, while Lucida Grande or Nokia Sans Wide are replaced with "Sans".

The only pattern I notice here is that fonts with spaces in their file names do not work (not sure about URW Bookman or URW Gothic — I don't know their filenames).

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 9.04
ExecutablePath: /usr/lib/notify-osd/notify-osd
Package: notify-osd 0.9.11-0ubuntu3
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: notify-osd
Uname: Linux 2.6.28-11-generic x86_64

Revision history for this message
R4kk00n (r4kk00n) wrote :
Revision history for this message
R4kk00n (r4kk00n) wrote :
description: updated
R4kk00n (r4kk00n)
description: updated
Revision history for this message
Mirco Müller (macslow) wrote :

The font sting parsing function is buggy. Thanks for the heads up!

Changed in notify-osd (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Changed in notify-osd (Ubuntu):
status: Confirmed → Triaged
Mirco Müller (macslow)
Changed in notify-osd (Ubuntu):
milestone: none → ubuntu-9.10
assignee: nobody → Mirco Müller (macslow)
Revision history for this message
Mirco Müller (macslow) wrote :

For the impatient the branch fixing this can be found here https://code.edge.launchpad.net/~macslow/notify-osd/fix-396736

Changed in notify-osd (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Mirco Müller (macslow) wrote :

Fix committed to Karmic maintainance branch of notify-osd.

Changed in notify-osd (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package notify-osd - 0.9.24-0ubuntu1

---------------
notify-osd (0.9.24-0ubuntu1) karmic; urgency=low

  * New upstream version:
    - fixed regression for newline-character replacement in the text_filter
    - fixed fonts issues (LP: #396736)
    - fixed crasher (LP: #425508
    - fixed another crasher (LP: #437088)
    - added workaround for icon-name-prefix substitution
    - fixed accidentally deleted drawing of drop-shadow for title-text
    - avoid re-executing glow-/dim-effect when synchronizing timeouts of bubbles

 -- Sebastien Bacher <email address hidden> Tue, 20 Oct 2009 11:23:14 +0200

Changed in notify-osd (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Chris Jones (cmsj) wrote :

I'm not sure if it's exactly this bug, or if the effect I'm seeing is deliberate, but after updating today the notification bubbles are really small. I have a 127dpi screen and use 6.5pt as my application font, and it seems like notify-osd is now using 4 or 5pt and I can barely read it!

Revision history for this message
Mirco Müller (macslow) wrote :

Chris, only one thing can help... screenshots (with visible samples of other UI-elements using the system-wide font).

Revision history for this message
Chris Jones (cmsj) wrote :

per our IRC discussion... I think the reason I'm seeing slightly different behaviour is that my application font is set to 6.5pt and notify-osd's extract_point_size() is assuming that font sizes are integers.
I really quick hack to convert that function to sscanf for %f and return a gdouble seems to work, but other than the fontconfig manual I can't conclusively prove that fractional font sizes are legal in gtk/gnome.

Revision history for this message
Mirco Müller (macslow) wrote :

Chris, to correctly solve this issue I would need a robust regular expression for extracting a floating point number (from something using the format "<string> <float>"), which I can feed into Gregex in extract_point_size(). Also its prototype would have to be changed to return a gdouble. With fabs() it has to be ensured to never return a negative value. I'm not sure at the moment how pedantic one has to be about negative values though. For that very reason, extract_point_size() right now returns gunit.

Revision history for this message
Chris Jones (cmsj) wrote :

Mirco: I'm wondering if it wouldn't be easier and more robust to use something like pango_font_description_from_string () to parse the font string into the family name and size?

Revision history for this message
Chris Jones (cmsj) wrote :

I'd want people considerably better at this than I am to confirm I'm not on crack, but the attached patch seems to do pretty sane things for me.

Revision history for this message
Chris Jones (cmsj) wrote :

Also those people would want to have a text editor that didn't just mangle all the whitespace. Sorry :(

Revision history for this message
Chris Jones (cmsj) wrote :

Per IRC request from Mirco, I have rebased my patch against lp:notify-osd/karmic and also taken the opportunity to tidy it up.

[11:21] <MacSlow> compare the reported "title-height: ..." and "body-height: ..."
                  from you patched notify-osd with unpatched lp:notify-osd/karmic

After setting my application font to 7pt:

-(cmsj@kiryo)-(/tmp/notify-osd-orig)- killall -15 notify-osd ; DEBUG=1 ./src/notify-osd
notify-osd: no process found
** Message: DEBUG mode enabled
font-size: 7pt
dpi: 127.0
pixels/EM: 12.35
width: 296 px
title-height: 7.00 pt
body-height: 6.30 pt

^C
-(cmsj@kiryo)-(/tmp/notify-osd-orig)- cd ../notify-osd-cmsj/
-(cmsj@kiryo)-(/tmp/notify-osd-cmsj)- killall -15 notify-osd ; DEBUG=1 ./src/notify-osd
** Message: DEBUG mode enabled
font-size: 7.000000pt
dpi: 127.0
pixels/EM: 12.35
width: 296 px
title-height: 7.00 pt
body-height: 6.30 pt

^C
-(cmsj@kiryo)-(/tmp/notify-osd-cmsj)-

Which seems like a good sign :)

With the setting back at 6.5pt:

-(cmsj@kiryo)-(/tmp/notify-osd-orig)- killall -15 notify-osd ; DEBUG=1 ./src/notify-osd
notify-osd: no process found
** Message: DEBUG mode enabled
font-size: 5pt
dpi: 127.0
pixels/EM: 8.82
width: 211 px
title-height: 5.00 pt
body-height: 4.50 pt

^C
-(cmsj@kiryo)-(/tmp/notify-osd-orig)- cd ../notify-osd-cmsj/
-(cmsj@kiryo)-(/tmp/notify-osd-cmsj)- killall -15 notify-osd ; DEBUG=1 ./src/notify-osd
notify-osd: no process found
** Message: DEBUG mode enabled
font-size: 6.500000pt
dpi: 127.0
pixels/EM: 11.47
width: 275 px
title-height: 6.50 pt
body-height: 5.85 pt

^C
-(cmsj@kiryo)-(/tmp/notify-osd-cmsj)-

and the notifications look better :)

Revision history for this message
Chris Jones (cmsj) wrote :
Mirco Müller (macslow)
Changed in notify-osd (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
Mirco Müller (macslow) wrote :

For the moment until the font-size extraction is fixed, please don't use fractional parts in your application font-size. So if you're using 9.5 use either 9.0 or 10.0

David Barth (dbarth)
Changed in notify-osd:
assignee: nobody → Mirco Müller (macslow)
importance: Undecided → Medium
milestone: none → ubuntu-9.10
status: New → In Progress
Changed in notify-osd (Ubuntu):
importance: Medium → Low
status: Triaged → In Progress
Revision history for this message
Mirco Müller (macslow) wrote :

Branch with fix (complete with correct extraction of font point-size with fractional-part) can be found here https://code.edge.launchpad.net/~macslow/notify-osd/fix-fractional-point-size

Revision history for this message
Alankatana (alankatana) wrote :

Hello
Having a hard time finding the fix for a very unreadable Popup font in my 8.5 Lotus notes install cant seem to change anything either with Lotus or with my system fonts?

Any help ....?
Alan

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package notify-osd - 0.9.25-0ubuntu1

---------------
notify-osd (0.9.25-0ubuntu1) lucid; urgency=low

  * New upstream version:
    - conditional refresh of blurred tiles, prevent regeneration of
      tiles if title, body, icon or value didn't change
    - font-sizes with fractional parts don't cause bubble to become tiny anymore
      (fixes LP: #396736, LP: #457655, LP: #458413, LP: #459290, LP: #459689)
    - all but drop-shadow use the faster exponential blur now
 -- Sebastien Bacher <email address hidden> Fri, 05 Feb 2010 12:41:32 -0800

Changed in notify-osd (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Jonathan (71KR117) (71krtt117) wrote :

it seems to happen with all fonts. I use ttf-droid and it happened. Very Annoying.

Revision history for this message
Jonathan (71KR117) (71krtt117) wrote :

How do you upgrade to 0.925-0ubuntu1? I only have 0.924-0ubuntu1.

Mirco Müller (macslow)
Changed in notify-osd:
status: In Progress → Fix Released
no longer affects: notify-osd
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.