Bug 108720 - Do not render previews of symbol fonts
Summary: Do not render previews of symbol fonts
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.0.0
Keywords:
: 93286 (view as bug list)
Depends on:
Blocks: Styles-Preview
  Show dependency treegraph
 
Reported: 2017-06-23 16:53 UTC by Yousuf Philips (jay) (retired)
Modified: 2023-11-22 15:16 UTC (History)
12 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2017-06-23 16:53:24 UTC
In bug 93968, the issue was resolved for LO's default symbol font, OpenSymbol, but the same also needs to happen for other symbol fonts like Webdings, Wingdings, Wingdings 2, and Wingdings 3.

Caolan suggested in bug 93968 comment 13 to expand the available list of symbol fonts in svtools/source/misc/sampletext.cxx under isSymbolFont[1] and then the necessary coding can use that as the basis for the fix.

Heiko, Stuart, Cor: Do you know any symbol fonts on Windows or Linux that should be added to the list?

Alex, Steve: Do you know any symbol fonts on Mac that should be added to the list?

Caolan: Maybe you can provide a bit more details on how this can be achieved so maybe it could be an easy hack. ;D

----

[1] https://cgit.freedesktop.org/libreoffice/core/tree/svtools/source/misc/sampletext.cxx#n106
Comment 1 Heiko Tietze 2017-06-24 06:49:32 UTC
Not an expert in this field but maybe Akshay. Arch Wiki talks about ttf-symbola https://wiki.archlinux.org/index.php/Fonts#Emoji_and_symbols, and Braille font might be interesting too.
Comment 2 Yousuf Philips (jay) (retired) 2017-06-24 14:45:04 UTC
Seems the previews in the font name combobox seems to already have the necessary code to not render such fonts and it would be useful for both locations to share this same.

(In reply to Heiko Tietze from comment #1)
> Not an expert in this field but maybe Akshay. Arch Wiki talks about
> ttf-symbola https://wiki.archlinux.org/index.php/Fonts#Emoji_and_symbols,
> and Braille font might be interesting too.

Checked symbola and the emoji fonts and they were fine, but Braille wasnt (bug 108738).

This is the list of symbol fonts on my system that didnt render correctly.

Webdings
Wingdings
Wingdings 2
Wingdings 3
Bookshelf Symbol 7

So here is the patch - https://gerrit.libreoffice.org/39217
Comment 3 Commit Notification 2017-06-24 20:46:46 UTC
Yousuf Philips committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3e82c30b89b87199b8f20658beecbfccccffcd52

tdf#108720 Add symbol fonts to isSymbolFont()

It will be available in 6.0.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.
Comment 4 Caolán McNamara 2017-06-24 20:53:41 UTC
include/svtools/sampletext.hxx isSymbolFont currently takes a const vcl::Font &rFont and checks its charset and its family name, so I suggest changing isSymbolFont to take a rtl_TextEncoding eCharSet and OUString familyname argument instead.

Then where we currently pass in rFont to pass in rFont.GetCharSet(), rFont.GetFamilyName() and in svx/source/styles/CommonStylePreviewRenderer.cxx where we now have
if (IsStarSymbol(pFontItem->GetFamilyName()))
change that to
if (isSymbolFont(pFontItem->GetCharSet(), pFontItem->GetFamilyName())
and presumably that should then do the right thing
Comment 5 Yousuf Philips (jay) (retired) 2017-06-25 21:42:51 UTC
Gulsah, Aron: Maybe one for the weekend. ;D
Comment 6 Alex Thurgood 2017-06-26 16:08:40 UTC
On a fairly default OSX installation :

Bodoni Ornaments
Stix (seems to be maths sysmbols)
Symbol
Webdings
Wingdings
Wingdings2
Wingdings3
Zapf Dingbats
Apple Braille
Apple Color Emoji
Comment 7 QA Administrators 2018-10-17 02:49:15 UTC Comment hidden (obsolete)
Comment 8 Adolfo Jayme Barrientos 2018-10-20 10:27:09 UTC
Everyone, please open follow-up bugs for individual font requests. Mark those as blocking this bug.
Comment 9 Aron Budea 2018-10-21 22:56:40 UTC
Caolán outlined a suggestion with code pointers in comment 4 that as far as I can see hasn't been implemented, perhaps let's leave this bug report open until that is done.
Comment 10 QA Administrators 2019-10-22 02:31:19 UTC Comment hidden (obsolete)
Comment 11 QA Administrators 2021-10-22 03:45:11 UTC Comment hidden (obsolete)
Comment 12 V Stuart Foote 2021-10-22 12:41:00 UTC
Seems to still be an issue, suggested refactoring of comment 4 remains to be done.
Meanwhile os/DE specific PUA only symbol fonts, e.g. "HoloLens MDL2 Assets" and "Segoe MDL2 Assets" from Windows 10, have to be dealt with.
Comment 13 QA Administrators 2023-10-23 03:14:19 UTC Comment hidden (obsolete)
Comment 14 V Stuart Foote 2023-10-23 20:42:50 UTC
as in comment 12, refactoring suggested comment 4 not yet in place.

@Khaled, any interest?
Comment 15 Stéphane Guillou (stragu) 2023-11-22 14:18:01 UTC
*** Bug 93286 has been marked as a duplicate of this bug. ***
Comment 16 ⁨خالد حسني⁩ 2023-11-22 15:16:15 UTC
It should be an easy hack