I am importing a very old bug from OpenOffice that is still present in LibO 3.4.1 RC2 and which I believe is a major issue for any Japanese user. http://openoffice.org/bugzilla/show_bug.cgi?id=109454 All Japanese fonts (except the system one) are displayed with an unusually tall line height, making it impossible to use the office suite efficiently. It affects every place where a Japanese font is used: the editing window and the UI. Firefox displays the same problem until one opens the advanced settings and turns browser.display.normal_lineheight_calc_control to "0" (disabling it). I am importing the Oo bug snapshots, since the behaviour hasn't changed.
Created attachment 48418 [details] Unusually tall line height (here shown in the menus and combo boxes)
Created attachment 48419 [details] Comparing side by side : bugged line height calculation, and GEdit
Created attachment 48420 [details] Comparing side-by-side with another random Japanese font
Created attachment 48421 [details] Menus in Firefox (without bugged line height calculation)
Created attachment 48422 [details] System menus (correct line height)
(In reply to comment #0) > I am importing a very old bug from OpenOffice that is still present in LibO > 3.4.1 RC2 and which I believe is a major issue for any Japanese user. > http://openoffice.org/bugzilla/show_bug.cgi?id=109454 > > All Japanese fonts (except the system one) are displayed with an unusually tall > line height, making it impossible to use the office suite efficiently. It > affects every place where a Japanese font is used: the editing window and the > UI. Can you give specific font names (FOSS fonts preferred)? Also a sample document using fonts showing the buggy behaviour can be helpful too. I think I know what might be causing this (I've been beaten by it) and may try to fix it.
I don't have a FOSS font that displays that behaviour,, the huge majority of Japanese fonts on the market aren't FOSS. But if you happen to have a cdrom of Windows Vista and up, the Meiryo font displays that behaviour. You don't even need a document to show the behaviour, just set your Gnome font to the problematic font and look at the menus in LibreOffice... But I've provided a really simple document for you anyway.
Created attachment 48929 [details] Document showing the behaviour, font is Meiryo (メイリオ)
I think I've found the root of this, in vcl/unx/generic/glyphs/gcach_ftyp.cxx:1042 there is a comment about line height in "asian" fonts being too small and reference to some bug ids, and it tries to "fix" this by adding extra line height for fonts with CJK support. This IMO is brain damaged, it is either the font is broken and need to be fixed or the behaviour is desired and should be kept, software should not play such tricks to "fix" fonts. The other part of the issue is that LibreOffice uses OS/2 WinAscent/WinDescent to set line spacing, which again is wrong as those values are intended for clipping and typoAscender/typoDescender/typoLineGap should be used instead. It seems those fonts have WinAscent/WinDescent values that are larger than typoAscender/typoDescender (which is perfectly OK) which adds to the increased line spacing.
I believe this is fixed on master with http://cgit.freedesktop.org/libreoffice/core/commit/?id=3364fefe1e2dec522211040f2f9ea37bf5cd7466 Please verify as I don't have a usable font for this.
Version 4.0.2.2 (Build ID: 400m0(Build:2)), still having the problem.
This is fixed in 4.1.0
Version 4.1.1.2 Build ID: 7e4286b58adc75a14f6d83f53a03b6c11fa2903 Definately fixed on the UI, and for most fonts in the editing window, but japanese opentype fonts (like Adobe's Kozuka) still have an unusual line height.
Created attachment 84844 [details] Snapshot of using Kozuka font. Attaching a snapshot of using Kozuka font. (UI uses a different japanese opentype font and looks right, but using the same font in the edit window produces the same result as with Kozuka.)
Please don’t keep re-opening this issue, the original bug has been fixed. Kozuka font issue is a different one, this font has a very big line gap value so it works as intended AFAIC, may be we souldn’t be using line gap above the first line (or below the last line), but that is an entirely different issue and is not Japanese specific.
I don't think the bug has been completely fixed. The behaviour I described is practically the same as I reported two years ago. I checked the attachment I sent back then and all but the Meiryo one use a japanese opentype (ShinGo from Morisawa actually). I don't think either that as you say these fonts were desgined to display such a huge amount of space above them, since they are basically aimed at space-concious desktop publishing. They display fine in GIMP, Inkscape, gedit/caja. LibreOffice, Firefox and Thunderbird on the other hand have problems with them. (For the two latter, at least that can be fixed with an advanced setting)
I remember that back then I tested with different fonts, including non-opentype japanese fonts. Most had an unusual line height, but the opentype (and some truetype like Meiryo) had it way over what is acceptable. What the fix that was applied in 4.1.0 has fixed is the UI (no matter what font is used), and the display of the fonts whose display was just slightly off back then. The opentype ones now feel like the extra space below has been added to the extra space above, which isn't a resolved case really. By the way, I wanted to check how is Meiryo behaving but I notice that LibreOffice is ignoring all installed .ttc (true type collections) ... Will have to find a way to split it to test...
Fine, I’m done here.
Yuki, please open a separate issue if you still are seeing problems with LO and fonts. We'll then investigate if LO is at fault or the font or TrueType fonts are support or not. Setting this here to fixed, since that what it is. Let's continue in a new bug from scratch with a clean plate. merci :)
You mean that I should start a bug report with the same title and almost the same description, really?
Moved to bug 68735.
You don't understand. This bug here is about a problem that has been fixed. What you are experiencing with some specific fonts is something different and hence will have a different solution and thus a different bug is appreciated. Thanks for understanding.
Right. I am the original report of this bug, I notice the same behaviour as 2 years ago but I am told it's fixed. Oh well. If you say so... There's nothing else I can do.