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 789597 - italic text appears broken
italic text appears broken
Status: RESOLVED INVALID
Product: vte
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-10-28 17:37 UTC by Christian Persch
Modified: 2017-12-05 20:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (18.94 KB, image/png)
2017-10-28 17:37 UTC, Christian Persch
Details

Description Christian Persch 2017-10-28 17:37:58 UTC
Created attachment 362451 [details]
screenshot

Using DejaVu Sans Mono as font, italic text appears to be bold-italic and is dropped below the baseline.

To repro:
$ app/vte-2.91 --font "DejaVu Sans Mono, 16"
and then inside:
$ printf "test\e[3mtest\e[0mtest\n"

Happens with both pango/freetype/fontconfig/harfbuzz from stock F25, and with git master-ish of these.

This is probably not a bug in vte itself, but in DejaVu, or pango, or ... In any case, I think it's a regression since IIRC it didn't happen back when italic support was added.

Using a different font, such as Liberation Mono, doesn't show the same bug. The difference appears to be that DejaVu Sans Mono doesn't actually have an italic variant, just an oblique variant, so the italic is probably synthesised.

If I change the code in vtedraw.cc to use PANGO_STYLE_OBLIQUE instead of PANGO_STYLE_ITALIC for the italic and bold italic font descriptions, the bug also doesn't appear, either with DejaVu nor with Liberation Mono (which in turn doesn't have an oblique variant, only an italic one).

Maybe we should just always use oblique instead of italic?
Comment 1 Egmont Koblinger 2017-10-28 17:57:35 UTC
Doesn't happen in ubuntu artful. The text looks okay. Also, changing to PANGO_STYLE_OBLIQUE doesn't make any difference here.

I have these files:

/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSansMono-BoldOblique.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Oblique.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf

although the Oblique ones shipped by another package than the other two. Do you also have all these?

Maybe our fontconfig configuration differs (e.g. italic falls back to oblique rather than synthesised)?
Comment 2 Christian Persch 2017-10-28 18:09:00 UTC
I have all of them. Turns out I did have some more of them, some old dejavu version installed locally; removing them I cannot repro anymore. Oops! :-(
Comment 3 Christian Persch 2017-10-28 18:15:56 UTC
(Independently of this, I'm still considering the ITALIC -> OBLIQUE change because it works better for CJK fonts. That's for later however.)
Comment 4 Egmont Koblinger 2017-10-28 18:44:18 UTC
Wouldn't that cause less "exciting" look (synthesised oblique rather than beautiful italic) in some Latin fonts? I think Latin should be our top priority.

Plus, nitpicking, ECMA-48 says "italicized".
Comment 5 Christian Persch 2017-10-28 19:19:38 UTC
That's why I said 'later', it's depending on some other work, and then it'll only be applied to CJK text :-)
Comment 6 Egmont Koblinger 2017-10-28 19:31:10 UTC
:-)
Comment 7 Egmont Koblinger 2017-12-05 14:40:58 UTC
Following the pattern of the forthcoming single/double/curly underline as SGR 4:1, 4:2, 4:3 (bug 721761), I guess we could introduce 3:1 and 3:2 for italic and oblique if we want apps to be able to choose. Might be an overkill though. (Is slanted another possibility, or the same as oblique?)
Comment 8 Christian Persch 2017-12-05 20:11:32 UTC
That's a good idea, actually.

(Oblique is french for slanted, so they're the same.)