On Fedora 27 64-bit en-US with Version: 5.4.4.1 Build ID: 5.4.4.1-1.fc27 CPU threads: 4; OS: Linux 4.14; UI render: default; VCL: gtk3; Locale: en-US (en_US.UTF-8); Calc: group and on current 6.1.0alpha0+ The text of formulas being entered in the "Formula editor" box is pushed up against the edge with the "Preview Window" and is being clipped. Also, there is some weird font metrics in play such that formula nodes composed using the default Liberation Serif are overlapping other nodes. Using the bottom example formula: "f ( x ) = {1} over {%sigma sqrt{2%pi} }func e^-{{(x-%mu)^2} over {2%sigma^2}}" A font replacement of Liberation Serif with FreeSerif gives clean composition of the nodes. See attached.
Created attachment 138409 [details] sm fromula editor showing clipping of formula and bad scaling of nodes clipping in the sm Formula Editor on Fedora 27 GTK3 with Wayland (same using Xorg), note also the scaling issues with nodes in the preview window. Substituting FreeSerif corrects the nodes.
Created attachment 138410 [details] same system GTK3 Wayland, but FreeSerif font substitution--nodes composed better
In this distro build Liberation Serif 2.00.1 is not bundled and the Liberation Serif 1.07.4 from the system is picked up so can be reproduced in a master self-build on fedora with rm instdir/share/fonts/truetype/Liberation*
hmm, Liberation Serif 1.07 has kUseTypoMetricsMask set while Liberation Serif 2.X and Times New Roman do not
Created attachment 138432 [details] LO 5.4.4.1 on REL 7.2 so GTK2, smath preview nodes with LiberationSerif 1.07.2 matches 2.00.1 and no clipping of text in the Formula Editor frame Used FontCreator and compared the font metrics for the 1.07.2 and 2.00.1 builds of LiberationSerif-Regular. They seem identical on the metrics and the general tab, only difference I saw was 2.00.1 picking up a header field mark: "Apple specific field 9 -- This field should be set if the font contains any strong right-to-left glyphs." I then installed TDF build of LO 5.4.4.1 on REL7.2 [3.10.0-693.11.1.el7.x86_64 #1 SMP Mon Dec 4 23:52:40 UTC 2017 (Centos 7.2)] Launching smath I see no issue with clipping of text in the sm Formula Editor frame with GTK2 here. And the formula nodes are well proportioned. And if I delete the 5.4.4.1 LiberationSerif*.ttf fronts from share/fonts/truetype, forcing fall back to the 1.07.2 ver of LiberationSerif (installed to /usr/share/fonts/liberation for LO 5.0.6.2) the 5.4.4 1 build does not have problems with the nodes in the preview using the fall back. So, it doesn't seem to be from fall back font and is something in GTK+ for Wayland in the Fedora builds.
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f8399f442d7bf5abf3861e0285997d13f355eb6a Related: tdf#114434 Enable ExtLeading by default for starmath edit window It will be available in 6.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Created attachment 138461 [details] Liberation Serif 1.07.2
Created attachment 138462 [details] Liberation Serif 1.07.4
I think that it works on RHEL7 just helps us track down that this was ok in RHEL Liberation Serif 1.07.2 and has changed by Fedora Liberation Serif 1.07.4 I attach here the screenshots of fontforge and the OS/2 table of the RHEL vs Fedora versions of the font (I rather suspect the different is in whatever tooling generates the ttf from the sfd source)
Yeah, if I build the fedora package on rhel-7 the bit is not set, while when built on fedora it is set
So I think the problem arises outside LibreOffice in the font itself so moving it to https://bugzilla.redhat.com/show_bug.cgi?id=1526510 and https://pagure.io/liberation-fonts
(In reply to Commit Notification from comment #6) > Caolán McNamara committed a patch related to this issue. > It has been pushed to "master": > > http://cgit.freedesktop.org/libreoffice/core/commit/ > ?id=f8399f442d7bf5abf3861e0285997d13f355eb6a > On Fedora 27 64-bit with Version: 6.1.0.0.alpha0+ Build ID: acc24edf21b99822b6e6d8119eba3ab843458401 CPU threads: 4; OS: Linux 4.14; UI render: default; VCL: gtk2; TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-12-15_01:59:17 Locale: en-US (en_US.UTF-8); Calc: group threaded Made sure I was in Wayland, but I was unable to force this TDF build to show GTK3 (I thought I just needed to set SAL_USE_VCLPLUGIN=gtk3)... Anyhow text entered into the sm "Formula Editor" now has room, and is not being clipped with addition of extra leading from the above commit. So think that is fixed. Also checked the TDF LO distributed LiberationSerif-Regular.ttf. It is ver 2.00.1, and in FontCreator it is showing the OpenType OS/2 version 3 is set. While the 1.07.04 build from Fedora 27 shows version 4 with "Use typo metrics for line spacing" set. Replace 1.07.04 with the 2.00.1--and with the 5.4.4.1-fc27 build nodes in the sm Preview Window are again correctly spaced. So there is a font metric gotcha with Liberation fonts and the OS/2 table metrics.
Wayland and/or version of gtk should have nothing to do with this, the TDF build IIRC don't have gtk3 support built in. The linked bugs have some more details as to what I think went wrong with the Fedora Liberation fonts and how Fedora can get that fixed
Stuart -> Caolán -- no objection. What caught my eye on opening in Fedora (first time in a while) was the clipping of sm formula input in the Formula Editor. The extra leading has cleared that--but was that a GTK3 issue? Anyhow, agree bad formula nodes were caused by Fedora changes to Liberation font's OS/2 tables 1.07.2 -> 1.07.4 (OTF version 3 -> version 4 and "Really use Typo metrics").
Its all the same problem, and unrelated to gtk3, its just that asking the edit window to actually use external leading makes it look right, and is probably the right thing to do anyway.