GNOME Bugzilla – Bug 789597
italic text appears broken
Last modified: 2017-12-05 20:11:32 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?
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)?
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! :-(
(Independently of this, I'm still considering the ITALIC -> OBLIQUE change because it works better for CJK fonts. That's for later however.)
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".
That's why I said 'later', it's depending on some other work, and then it'll only be applied to CJK text :-)
:-)
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?)
That's a good idea, actually. (Oblique is french for slanted, so they're the same.)