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 109513 - vte 0.11.0: displayed font much smaller than setting
vte 0.11.0: displayed font much smaller than setting
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
0.11.x
Other Linux
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-03-29 22:27 UTC by uzs33d
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.3/2.4


Attachments
screenshot showing discrepency in selected and displayed font size (105.05 KB, image/jpeg)
2003-04-25 21:03 UTC, uzs33d
Details

Description uzs33d 2003-03-29 22:27:00 UTC
After upgrading libvte4 to version 0.11.0-1 the displayed font in
gnome-terminal is much smaller than the setting in

edit->profile->edit->general->font size

For example I have to set size to 18 to get an actual size of about 14.

After downgrading back to version 0.10.26-1 the font displayed
according to it's setting.

If you upgrade while logged into gnome, then you must first log out
and relogin for the bug to become noticable.
Comment 1 uzs33d 2003-03-29 23:01:20 UTC
Okay, you don't have to logout...you just have to exit all terminals
and then relaunch (so that the shared library gets reloaded.)

I verified that it's enough simply to replace /usr/lib/libvte.so.4.0.0
version 0.10.26 with libvte.so.4.0.0 version 0.11.0 to reproduce the bug.
Comment 2 Ryuji Abe 2003-04-03 04:37:40 UTC
I have the same problem. When the VTE_USE_DRAW environment variable is
set to 0, the problem is not occurred.
Comment 3 Nalin Dahyabhai 2003-04-21 19:59:53 UTC
The GTK+ DPI hint was being applied wrong.  Should be fixed in 0.11.1.
Comment 4 Jeff Waugh 2003-04-23 14:11:38 UTC
This bug is still present in 0.11.3.
Comment 5 Christian Marillat 2003-04-25 15:12:09 UTC
And still in 0.10.4
Comment 6 Nalin Dahyabhai 2003-04-25 19:30:35 UTC
I'm still not seeing it here -- the terminal's font corresponds
exactly to what I'm selecting in the font selector.  Which font family
are you seeing this with?  You're certain that the terminal in this
case was started with --disable-factory or with no others already open?
Comment 7 uzs33d 2003-04-25 21:01:35 UTC
I just checked out the cvs source from Apr. 25th, 2003 at 21:43
UT. This is version 0.11.4 of vte, and I'm definitely seeing the
bug. All I have to do is copy over the /usr/lib/libvte.so.4.0.0 with
the version compiled from the cvs source and open a new
terminal. Here's some info:

The bug occurs with all fonts that I select, but I'm using "courier 10
 pitch" at 14 pt size. 

I have anti-aliased text enabled and have this in my .bashrc: 
export GDK_USE_XFT=1.

I'm using version 2.2.1 of gnome-terminal, which has xft compiled into it:

josh@spleen:~$ ldd /usr/bin/gnome-terminal  | egrep Xft\|xft\|vte
        libvte.so.4 => /usr/lib/libvte.so.4 (0x4001e000)
        libXft.so.2 => /usr/X11R6/lib/libXft.so.2 (0x400cb000)
        libpangoxft-1.0.so.0 => /usr/lib/libpangoxft-1.0.so.0 (0x4072a000)


The work around suggested above, setting VTE_USE_DRAW=0, which works
for me in version 0.11.0 of libvte, no longer works with version
0.11.4, so we've made negative progress.

I'll attach a screenshot of an open terminal running along with the
font selection menu in which you can cleary see the difference in font
sizes.


Comment 8 uzs33d 2003-04-25 21:03:34 UTC
Created attachment 16010 [details]
screenshot showing discrepency in selected and displayed font size
Comment 9 Nalin Dahyabhai 2003-04-25 21:08:32 UTC
What is the selected DPI setting in gnome-font-properties?  Can you
run "xprop -root | grep ^RESOURCE_MANAGER" and append the output?
Comment 10 uzs33d 2003-04-25 21:10:50 UTC
josh@spleen:~$ xprop -root | grep ^RESOURCE_MANAGER
RESOURCE_MANAGER(STRING) =
"*customization:\t-color\nXft.antialias:\t1\nXft.dpi:\t103.000000\nXft.hinting:\t1\nXft.hintstyle:\thintmedium\nXft.rgba:\tnone\n"
Comment 11 Nalin Dahyabhai 2003-04-25 21:21:21 UTC
Does sid also include the patch to GTK+ to allow it to use these hints?
Comment 12 uzs33d 2003-04-25 21:25:55 UTC
As far as this dpi hint goes: If I'm not mistaken, this dpi hint value
is set in start-here->desktop preferences->font->details->dpi and it
doen't really matter what this is set to on my setup because I don't
have the "use the same font size as other applications" box checked
(see screenshot.)

If I check the box, then the terminal font changes size, so it would
seem that this hint is used, but the displayed font is still smaller
than the setting.
Comment 13 Nalin Dahyabhai 2003-04-25 21:39:45 UTC
The DPI value from the gnome-font-properties dialog is always used if
GTK+ supports it.  I guess a better question would be: if you change
the DPI in the dialog to 72 and change nothing else, does the terminal
font size change?
Comment 14 uzs33d 2003-04-25 22:08:27 UTC
Okay, now I know a little more about when the error occurs:

Using libvte version 0.11.0 from sid, the font size changes when the
box is checked and when I change the dpi (and I close all terminals
and open a new one.) so sid has the patch.

Using the cvs version I checked out and compiled today (version
0.11.4), the font size does not change when the box is checked and I
change the dpi setting. I guess this patch isn't in cvs, huh?

Here's a new piece of info: When the box is checked then the terminal
displays the same size font as is set for "applications" (why it's not
displaying the font set for "terminal applications" is probably a
separate bug.)

Only when in the terminal profile the box is *not* checked, and the
font gets set directly in the terminal profile dialog, does the
terminal display the wrong font size. In this case, I verified that
the workaround above works in version 0.11.0 from sid, but not with
the cvs version from today.


Comment 15 uzs33d 2003-04-25 22:38:45 UTC
I have to quantify my last observation:

Using libvte version 0.11.0 from sid, the font size changes when the
box is checked **and when the environment variable VTE_USE_DRAW=0**,
then font size changes when I change the dpi. If the variable is not
set to zero, then the font size in the terminal does not change when
after changing the dpi.

Using libvte version 0.11.4 from cvs today, the font size does not
change when the box is checked when I change the dpi, *regardless of
the value of VTE_USE_DRAW*, whether 0,1, or unset.

Comment 16 Nalin Dahyabhai 2003-04-25 23:06:09 UTC
Please forget about 0.11.0 and the VTE_USE_DRAW environment variable.
 Neither is the same as HEAD, which is what I'm trying to make sure
works here.

If you change the DPI setting in gnome-font-properties, does the text
in other windows resize?  If it does, then something's wrong in the
way vte is applying the Xft hints that it's getting from GTK.
Comment 17 uzs33d 2003-04-26 08:01:52 UTC
Yes. When I change the dpi in gnome-font-props, all the fonts in other
applications and the window decorations etc. change after closing the
application and restarting it, but not the font in the terminal. Does
this help?
Comment 18 uzs33d 2003-04-27 09:02:54 UTC
I've been playing with the dpi hint stuff in vtefc.c and vteglyph.c to
no avail...where else should I be looking?
Comment 19 Nalin Dahyabhai 2003-04-28 19:01:07 UTC
If the applications need to be restarted in order for font settings to
take effect, then the installed version of GTK+ doesn't support
reporting those settings.  A working fallback (to the resource
database) should have things looking normally in CVS now.
Comment 20 uzs33d 2003-04-29 08:01:17 UTC
I am sorry to say  that I checked out and compiled HEAD from Apr. 29th
at 8:50 UT. The bug is still there, just as stubborn as ever.
Comment 21 uzs33d 2003-04-29 08:11:22 UTC
uh, maybe I misunderstood what you meant by a "working fallback." I
though you meant some kind of fix. I see that you just issue a warning
that font selection won't work properly. Does that mean that you
consider this nab?

Even if the version of gtk+ is supporting dynamic changing of dpi, the
terminal should still get initialized properly, right?
Comment 22 uzs33d 2003-04-29 08:13:03 UTC
sorry, I meant to say, 

Even if the version of gtk+ *doesn't* support dynamic changing of dpi...
Comment 23 Nalin Dahyabhai 2003-04-29 13:54:00 UTC
Er, no, that warning was removed once the fallback went in.  My guess
is anoncvs didn't have the newest code yet.
Comment 24 uzs33d 2003-04-29 14:21:10 UTC
Yes. I checked out head again Apr. 29th at 15:11 UTC and recompiled.
The font is now being displayed at the correct size (juhu.)

I don't know if the remaining discrepency is a different bug, you tell me:

If, in the edit profiles box, I check "use the same font size as other
applications" it displays a font at the same size as is selected in
gnome-font-properties as application font, but doesn't display the
correct face. i.e. if I change the size of the application font, then
the font in the terminal also changes size, but if I select a differnt
font, the face (shape) never changes.

If, in the edit profiles box, I do *not* check the box, and select the
font directly in the dialog then the font in the terminal displays
both the correct size and the correct face.

The second question is why the terminal responds to the "application
font" and not to the "terminal font" setting in gnome-font-properties.
Comment 25 Nalin Dahyabhai 2003-04-29 15:57:26 UTC
If the terminal is obeying the size, then it's working as
gnome-terminal expects it to.  If the font-properties dialog indicates
that something else should happen, then it's a policy disagreement
between gnome-terminal and the control-center module, nothing to be
done about that in the vte module.
Comment 26 Jeff Waugh 2003-05-01 05:17:37 UTC
Although the bug is resolved, just wanted to mention that this seems
to be fully resolved as of 0.11.5.

Thanks Nalin!