After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 559014 - Blank lines are not shown in a GtkLabel that has a Pango font family attribute
Blank lines are not shown in a GtkLabel that has a Pango font family attribute
Status: RESOLVED DUPLICATE of bug 455940
Product: pango
Classification: Platform
Component: win32
1.22.x
Other All
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
pango-maint
Depends on:
Blocks:
 
 
Reported: 2008-11-02 23:24 UTC by Ian Puleston
Modified: 2009-11-04 17:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A simple program that demonstrates the problem (1.27 KB, application/x-compressed-tar)
2008-11-02 23:33 UTC, Ian Puleston
Details

Description Ian Puleston 2008-11-02 23:24:06 UTC
Please describe the problem:
This happens with Pango 1.22.0 but not with 1.20.5, and it only happens in Windows, not in Linux.

If a GtkLabel has a Pango attributes list with an attribute to set the font family with certain fonts (added using pango_attr_family_new) then any blank lines in the text do not display, and it displays the text all squeezed up together. I tried calling pango_attr_family_new() with "Courier" and Veranda" and these both showed this problem, but calling it with "Arial" did not.

Steps to reproduce:
1. Compile and run the test application (which I will attach) with Pango 1.22.0 and the text displays incorrectly.
2. Compile and run the test application with Pango 1.20.5 and the text displays as expected.


Actual results:
The label displaying text with the default font has blank lines, but the label displaying the same text with Courer font does not.

Expected results:
Blank lines should be shown in both labels.

Does this happen every time?
Yep.

Other information:
Note I was also using 2.14.4 and GLib 2.18.2.
Comment 1 Ian Puleston 2008-11-02 23:33:31 UTC
Created attachment 121838 [details]
A simple program that demonstrates the problem

Attached a simple program that demonstrates the problem, with a make file - just type make to build it. Build and run this with Pango 2.22.0 in Windows to see the problem.
Comment 2 Ian Puleston 2008-11-05 23:32:48 UTC
A bit more information. I notice that Courier New works OK where Courier does not. I then ran both cases with Pango debug messages turned on and compared the output, and found they differ significantly only here:

With Courier:
text_is_simple: Pango 1.22 (12 wchar_t): YES
pango_win32_font_map_load_font:624 name=Courier
pango_win32_font_map_load_font:624 name=Courier
pango_win32_font_map_load_font:624 name=Courier
pango_win32_font_map_load_font:624 name=dejavu sans

With Courier New:
text_is_simple: Pango 1.22 (12 wchar_t): YES
pango_win32_font_map_load_font:624 name=Courier New
pango_win32_font_map_load_font:632 got win32family
pango_win32_font_map_load_font:624 name=Courier New
pango_win32_font_map_load_font:632 got win32family
text_is_simple: The quick  (44 wchar_t): YES
pango_win32_font_map_load_font:624 name=Courier New
pango_win32_font_map_load_font:632 got win32family
text_is_simple: 0123456789 (10 wchar_t): YES
pango_win32_font_map_load_font:624 name=Courier New
pango_win32_font_map_load_font:632 got win32family
pango_win32_font_map_load_font:624 name=Courier New
pango_win32_font_map_load_font:632 got win32family
pango_win32_font_map_load_font:624 name=dejavu sans

And that same section of debug output with Courier from Pango 1.20.5 (which displays it OK) is:
text_is_simple: Pango 1.20 (12 wchar_t): YES
pango_win32_font_map_load_font:513 name=Courier
pango_win32_font_map_load_font:521 got win32family
pango_win32_font_map_load_font:513 name=Courier New
pango_win32_font_map_load_font:521 got win32family
text_is_simple: English He (13 wchar_t): YES
pango_win32_font_map_load_font:513 name=Courier New
pango_win32_font_map_load_font:521 got win32family
text_is_simple: 0123456789 (10 wchar_t): YES
pango_win32_font_map_load_font:513 name=Courier
pango_win32_font_map_load_font:521 got win32family
pango_win32_font_map_load_font:513 name=Courier
pango_win32_font_map_load_font:521 got win32family
pango_win32_font_map_load_font:513 name=dejavu sans

So it would appear that Pango 1.22 is not recognizing Courier as a Win32 family font.
Comment 3 Peter Frentrup 2009-03-27 18:37:19 UTC
This seems to be the same as Bug 455940.
Comment 4 Tor Lillqvist 2009-11-04 09:49:19 UTC
Just attaching the test program as a single source file would be enough, people who are capable of debugging and helping have no problem building it. Anyway, resolving as duplicate.

*** This bug has been marked as a duplicate of bug 455940 ***
Comment 5 Tor Lillqvist 2009-11-04 09:51:49 UTC
Btw, are you sure you mean "Veranda" and not "Verdana"?
Comment 6 Ian Puleston 2009-11-04 17:57:04 UTC
Verdana sorry - my mistake.

Don't want to get into an argument about it, but the makefile is all of 250 bytes and it was there so I saw no reason not to include it.