Bug 129246

Summary: Breaks textinput-fields
Product: [Fedora] Fedora Reporter: Enrico Scholz <rh-bugzilla>
Component: pangoAssignee: Owen Taylor <otaylor>
Status: CLOSED RAWHIDE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: rawhideCC: llim
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-20 19:19:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 123268    
Attachments:
Description Flags
Screenshot gtk-demo + gnome-font-properties none

Description Enrico Scholz 2004-08-05 14:57:51 UTC
Description of problem:

Recent pango seems to break the height of textinput-fields and related
widgets (see 'Resolution:' field and the GtkEntrycompletion widget in
the attached screenshot).

With previous version (pango-1.4) things were ok.


Version-Release number of selected component (if applicable):

pango-1.5.2-1


How reproducible:

100%

Comment 1 Enrico Scholz 2004-08-05 14:58:48 UTC
Created attachment 102451 [details]
Screenshot gtk-demo + gnome-font-properties

Comment 2 Owen Taylor 2004-08-05 16:09:18 UTC
Does this happen with all fonts? Does it happen if you create
a new user account and try logging in with that?


Comment 3 Enrico Scholz 2004-08-05 16:45:08 UTC
Seems to happen with bitmap fonts only (Helvetica, Lucida, MiscFixed). When
creating a new user and copying my ~/.fonts directory, it can be reproduced
there also:

| $ ll ~/.fonts
| total 12
| lrwxrwxrwx  1 ensc ensc 30 Jan  8  2004 75dpi -> /usr/X11R6/lib/X11/fonts/75dpi
| -rw-rw-r--  1 ensc ensc  0 Jul  8 09:48 Fontmap
| lrwxrwxrwx  1 ensc ensc 30 Jan  8  2004 Type1 -> /usr/X11R6/lib/X11/fonts/Type1
| -rw-rw-r--  1 ensc ensc 95 Feb 13 03:28 fontpaths
| -rw-rw-r--  1 ensc ensc 50 Jul  8 09:48 fonts.cache-1
| -rw-r--r--  1 ensc ensc  2 May  1 21:06 fonts.dir
| lrwxrwxrwx  1 ensc ensc 29 Jan  8  2004 misc -> /usr/X11R6/lib/X11/fonts/misc


Comment 4 Owen Taylor 2004-08-05 17:37:21 UTC
What FreeType version?

Comment 5 Enrico Scholz 2004-08-05 17:53:47 UTC
$ rpm -q freetype
freetype-2.1.7-5


Comment 6 Owen Taylor 2004-08-05 17:59:41 UTC
Can you test with the FreeType-2.1.9 that should be in Rawhide
now? (I built it yesterday.) This is almost certainly a 
bug in the interaction between FreeType and Pango and probably
on the FreeType side, so I'd like to test with the current code.


Comment 7 Enrico Scholz 2004-08-05 19:14:28 UTC
The problem still exists; I selected 'MiscFixed' (Helvetica does not
work; see below) and the input-fields are still too small.


This freetype gives a new problem: I get

| $ LANG=C gnome-font-properties 
| 
| ** (gnome-font-properties:5816): WARNING **: Cannot open font file for font Helvetica 10
| 
| ** (gnome-font-properties:5816): WARNING **: Cannot open font file for font Helvetica Bold 12
| 
| ** (gnome-font-properties:5816): WARNING **: Cannot open font file for font Helvetica Bold 10


and the displayed fonts are not Helvetica. Downgrading to the old
freetype, makes the warning disappear.


strace'ing gnome-font-properties shows

| open("/home/ensc/.fonts/75dpi/helvR12-ISO8859-1.pcf.gz", O_RDONLY) = 19
| fcntl64(19, F_SETFD, FD_CLOEXEC)        = 0
| fstat64(19, {st_mode=S_IFREG|0444, st_size=4211, ...}) = 0
| mmap2(NULL, 4211, PROT_READ, MAP_PRIVATE, 19, 0) = 0x40038000
| close(19)                               = 0
| munmap(0x40038000, 4211)                = 0
| getpid()                                = 5816
| write(2, "\n** (gnome-font-properties:5816)"..., 90) = 90


The file above is from

| $ rpm -qf /home/ensc/.fonts/75dpi/helvR12-ISO8859-1.pcf.gz
| xorg-x11-75dpi-fonts-6.7.0-5.1


Comment 8 Owen Taylor 2004-08-12 19:50:10 UTC
The "unable open font file" is, I  think

  http://freedesktop.org/bugzilla/show_bug.cgi?id=1062

Once we get a fix for that, we can revisit the metrics issue.

Comment 9 Enrico Scholz 2004-09-16 18:32:55 UTC
The 'unable open font file' disappeared with 

pango-1.5.2-3
freetype-2.1.9-1


But the broken input fields stay.

Comment 10 Owen Taylor 2004-09-20 15:01:50 UTC
*** Bug 132717 has been marked as a duplicate of this bug. ***

Comment 11 Owen Taylor 2004-09-20 15:15:54 UTC
I tried the following sequence of steps:
 
 - Create a new user
 - Login as that user, mkdir ~/.fonts
 - cd ~/.fonts; ln -s /usr/X11R6/lib/X11/fonts/75dpi . ; fc-cache .
 - run gnome-font-properties, change the font to Helvetica 9
 - log out and log back in so the new fonts are picked up by all apps
 - Run gnome-font-properties, select Details

The dpi entry appears correct to me. Can you verify that the above
sequence of steps reproduces the problem for you?
 

Comment 12 Enrico Scholz 2004-09-20 15:47:10 UTC
deactivating 'Hinting' seems to trigger it

Comment 13 Owen Taylor 2004-09-20 16:59:49 UTC
OK, got it; fixed checked into upstream:

Mon Sep 20 12:17:37 2004  Owen Taylor  <otaylor>
 
        * pango/pangofc-font.c (get_face_metrics):
        Don't use face->ascender/descender for non-scalable fonts,
        since they aren't set. (#Enrico Scholz,
        https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=129246)

Thanks a lot. Will, build a pango-1.6.0 with this patch soon.


Comment 14 Owen Taylor 2004-09-20 19:19:30 UTC
Should be fixed in 1.6.0-2