Recent Mac-specific fixes in LibreOffice

 

Over the past months, we have been able to make some resources available to look into the most urgent Mac-specific bugs in LibreOffice, thanks to people purchasing LibreOffice Vanilla on the Mac App Store.
 

We addressed all the high priority Mac regressions

A few bugs were related to use of various 3rd-party fonts on macOS. The system APIs used by LibreOffice to enumerate installed typefaces and their styles indicate the weight of the font as a floating-point number between -1.0 and 1.0, with zero being “regular” weight. That number needs to be converted to an integer (with just ten separate values) used in LibreOffice. The mapping is heuristic, and it turned out that tweaking the mapping just a little bit made it possible to distinguish between some weights of a typeface that had previously mapped to the same weight in LibreOffice.

Another issue was that for some other 3rd-party fonts, the system API claimed that the weight of the “Regular” style was non-zero and positive (0.23 to be exact), i.e., a bit on the bold side. LibreOffice trusted that, which lead to the bold style always being selected for those typefaces, even when asking for a non-bold, regular (medium) weight. The fix for this was to simply handle these special cases separately. If resources allow and more similar problematic fonts are identified, some more generic fix would be needed.

Another set of bugs were related to notifications for screen parameter changes (like when changing the size of the Dock, or attaching or detaching monitors). On some Macs, the system sent these notifications quite eagerly for no obvious reason. LibreOffice was asking to receive such notifications too early before it was prepared to handle them. This lead to a crash. The fix was to request notifications only once being prepared to receive them.

Also, the handler for this notification did not check whether anything had actually changed that LibreOffice would want to know but just went through all the motions of re-calculating layouts of GUI and sizes of text and whatnot, totally in vain. This took a considerable amount of time when you had a lot of document windows open and several of these notifications were received. The fix here was to add a check if anything actually had changed that would be of interest to LibreOffice, and if not, just don’t proceed to do any re-calculations of layouts etc.

Finally, there was a problem with inserting videos in Impress presentations. When doing that LibreOffice (for some reason) copies the video file first into a temporary copy. That copy was given a name without file name extension. The system APIs used to open and display the video did not like that and displaying even an initial grabbed frame from the video failed. The fix was simply to make sure the copy of the video file had the same file name extension as the original one.

We’ll be addressing more Mac issues as when as we sell more LibreOffice Vanilla. Why not get involved to ensure they’re well triaged and prioritized!

Read more details how Collabora started maintaining LibreOffice Vanilla in the Mac app store.

Download now!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.