Bug 136633 - Text in LO brand logo rendered ugly when anti-aliasing is disabled
Summary: Text in LO brand logo rendered ugly when anti-aliasing is disabled
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected) release
Hardware: All Windows (All)
: medium minor
Assignee: Not Assigned
Keywords: needsDevAdvice
: 143545 (view as bug list)
Depends on:
Blocks: About-Dialog
  Show dependency treegraph
Reported: 2020-09-10 04:42 UTC by Ming Hua
Modified: 2021-08-19 14:55 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:

Screenshot of the "About LibreOffice" dialog (47.00 KB, image/png)
2020-09-10 04:42 UTC, Ming Hua

Note You need to log in before you can comment on or make changes to this bug.
Description Ming Hua 2020-09-10 04:42:07 UTC
Created attachment 165343 [details]
Screenshot of the "About LibreOffice" dialog

When anti-aliasing feature is turned off, the text of the LibreOffice logo in the "About LO" dialog is rendered with rugged boundary and very ugly, see attached screenshot.

Steps to produce:
1. In Tools > Options > LibreOffice > View panel, find the "Use anti-aliasing" option and uncheck it;
2. Restart LO as required;
3. Help > About LibreOffice to open the dialog, look at the LO logo.

Happens in 7.0 series only and not in 6.4 or earlier, presumably because the logo was redesigned for 7.0?
Version: (x64)
Build ID: 7cbcfc562f6eb6708b5ff7d7397325de9e764452
CPU threads: 2; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: zh-CN (zh_CN); 界面: zh-CN
Calc: threaded

The problem persists when switched to English UI, as well as when Skia is disabled.
Comment 1 Heiko Tietze 2020-09-10 08:20:51 UTC
Both the brand image as well as the logo are SVGs now. And vectors draw badly without anti-aliasing. Don't see what we can do to improve this (expect moving back to PNG using two versions for low and hi-res screens).
Comment 2 V Stuart Foote 2021-07-26 18:52:14 UTC
*** Bug 143545 has been marked as a duplicate of this bug. ***
Comment 3 V Stuart Foote 2021-07-26 19:38:00 UTC
Isn't the SVG for imBrand being converted from SVG to bitmap? And then has to be down sampled to fit scaling of the StartCenter or the Help About dialog?

Opening the SVG directly external to LibreOffice-- logo.svg opens at 600 x 115 px, while logo-sc.svg (for the StartCenter) opens at 600 x 124 px (bcz it needs extra height for the descender of the y in Community).


Comment 4 V Stuart Foote 2021-07-26 19:56:48 UTC
(In reply to V Stuart Foote from comment #3)

> =-ref-=
> https://opengrok.libreoffice.org/xref/core/sfx2/source/appl/appmisc.
> cxx?r=107399d6&fi=loadBrandSvg#127

And for the BackingWindow for the StartCenter, same loadBrandSvg for the logo-sc.svg and the SVG is being converted and scaled.  Quality of the downsampling/scaling is causing the bad rendering in the UI.


Comment 5 Heiko Tietze 2021-08-19 14:55:29 UTC

93    const tools::Long nWidth(m_pCopyrightLabel->get_preferred_size().getWidth());
94    BitmapEx aBackgroundBitmap;
96    if (SfxApplication::loadBrandSvg(Application::GetSettings()
97                                             .GetStyleSettings()
98                                             .GetDialogColor()
99                                             .IsDark()
100                                         ? "shell/logo_inverted"
101                                         : "shell/logo",
102                                     aBackgroundBitmap, nWidth * 0.8)) {
103      ScopedVclPtr<VirtualDevice> m_pVirDev =
104          m_pBrandImage->create_virtual_device();
105      m_pVirDev->SetOutputSizePixel(aBackgroundBitmap.GetSizePixel());
106      m_pVirDev->DrawBitmapEx(Point(0, 0), aBackgroundBitmap);
107      m_pBrandImage->set_image(m_pVirDev.get());
108      m_pVirDev.disposeAndClear();

It says: Load the SVG and size it to 80% of the length of the copyright text. Then draw this image exactly as it to the provided image canvas.

For me on Linux it's crisp with or without antialiasing.