Download it now!
Bug 82259 - Font dropdown language hint is nonsensical for some fonts
Summary: Font dropdown language hint is nonsensical for some fonts
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: Other All
: low minor
Assignee: Caolán McNamara
URL:
Whiteboard: target:4.4.0 target:4.3.2
Keywords:
Depends on:
Blocks: Fonts-Name-Combobox
  Show dependency treegraph
 
Reported: 2014-08-06 17:56 UTC by Matthew Francis
Modified: 2020-01-08 22:37 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Nonsensical text for Apple Color Emoji font (87.33 KB, image/png)
2014-08-06 17:59 UTC, Matthew Francis
Details
Nonsensical text for Mshtakan font (86.00 KB, image/png)
2014-08-06 17:59 UTC, Matthew Francis
Details
Nonsensical text for STIX font (79.95 KB, image/png)
2014-08-06 17:59 UTC, Matthew Francis
Details
Nonsensical text for Symbol font (88.68 KB, image/png)
2014-08-06 18:00 UTC, Matthew Francis
Details
Round 2: Hoefler Text and Iowan Old Style as rendered in 4.3.0.4 (12.46 KB, image/png)
2014-08-16 09:45 UTC, Matthew Francis
Details
Round 2: Hoefler Text and Iowan Old Style as rendered in 4.4 master (12.82 KB, image/png)
2014-08-16 09:45 UTC, Matthew Francis
Details
Round 2: STIXSize(One,Two,Three,Four,Five)Sym as rendered in 4.4 master (14.89 KB, image/png)
2014-08-16 09:46 UTC, Matthew Francis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Francis 2014-08-06 17:56:37 UTC
Observed on OSX 10.9.4/Libreoffice 4.3.0.4

In the font dropdown in Writer and (presumably) elsewhere, a selection of fonts show a hint on the right side as to what language the font is suitable for (or in some cases apparently a sample of miscellaneous characters covered by the font)

For some fonts, this hint text is nonsensical. On OSX, specifically:
Apple Color Emoji
Mshtakan
STIXSizeOneSym
STIXSizeTwoSym
STIXSizeThreeSym
STIXSizeFourSym
Symbol
Comment 1 Matthew Francis 2014-08-06 17:59:01 UTC
Created attachment 104165 [details]
Nonsensical text for Apple Color Emoji font
Comment 2 Matthew Francis 2014-08-06 17:59:34 UTC
Created attachment 104166 [details]
Nonsensical text for Mshtakan font
Comment 3 Matthew Francis 2014-08-06 17:59:58 UTC
Created attachment 104167 [details]
Nonsensical text for STIX font
Comment 4 Matthew Francis 2014-08-06 18:00:22 UTC
Created attachment 104168 [details]
Nonsensical text for Symbol font
Comment 5 Adolfo Jayme 2014-08-07 00:40:34 UTC
Thank you for your bug report.
Comment 6 Commit Notification 2014-08-11 11:48:12 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=94753833b94dee42ce2e0e7e7f3f354c2a605730

Related: fdo#82259 add Armenian preview text



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 7 Commit Notification 2014-08-11 12:14:33 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=212f745c29c7399fa0d62a53d3836dc1e829e953

Related: fdo#82259 stmary can render its own name, but unreadably



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 8 Commit Notification 2014-08-12 13:36:27 UTC
Adolfo Jayme Barrientos committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=25e81910d1b560c7ef05a907abbf80fb2c647d32

Related: fdo#82259 list Apple Color Emoji as a symbol font.



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 9 Commit Notification 2014-08-12 13:59:11 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Related: fdo#82259 all the STIX fonts are really for symbols



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 10 Commit Notification 2014-08-12 13:59:26 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=16076f120340673ad64df1614206f0e13e3539d5

Resolves: fdo#82259 use same symbol strategy on all platforms



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 11 Commit Notification 2014-08-12 13:59:39 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=662af47c3c1628700661a8d5ccfee784f7e2195b

Related: fdo#82259 OpenSymbol doesn't have 0x2706 or 0x2704 so no preview



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 12 Commit Notification 2014-08-12 14:54:50 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=92f3e68cd107b48ca24563e27c36afa963f392e3

Related: fdo#82259 esint10 can't render its name either



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 13 Commit Notification 2014-08-12 14:55:04 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=198a775ebccc69e71b97f048d1d6c4b9651662ad

Related: fdo#82259 Show same preview for both Symbol variants



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 14 Caolán McNamara 2014-08-12 15:01:23 UTC
a) MshTakan is for Armenian, so added an Armenian preview.
b) The other fonts are symbol fonts, but there was a different symbol selection policy under MacOSX, so now lets use the same strategy on all platforms.
c) Add a custom preview for the two different "Symbol" fonts, the Adobe one and the Apple one which is recoded into the unicode positions.
Comment 15 Matthew Francis 2014-08-12 15:06:10 UTC
Nicely done. Thanks for the hard work
Comment 16 Commit Notification 2014-08-12 16:35:05 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=56dc7aecc3194dac8012ebc252fb893125f64ebc

Related: fdo#82259 not all STIX are symbol fonts



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 17 Commit Notification 2014-08-12 16:45:11 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bea80c70375fd370f080d65089fff54abfa73870&h=libreoffice-4-3

Related: fdo#82259 add Armenian preview text


It will be available in LibreOffice 4.3.2.

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 18 Commit Notification 2014-08-12 16:46:58 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4fbf715763122215ae8d8d961d73a5b7867dd6c6&h=libreoffice-4-3

Related: fdo#82259 not all STIX are symbol fonts


It will be available in LibreOffice 4.3.2.

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 19 Matthew Francis 2014-08-16 09:44:13 UTC
I looked at this again in the latest 4.4 master and there are a couple of... not exactly regressions; side-gressions? A bit weird both before and after, but differently.

The fonts:
  Hoefler Text
  Iowan Old Style

In 4.3.0.3 the representative text for these is assorted accented characters. In 4.4 master the text seems noticeably more random.

However, in fact, I think both of these are supposed to be essentially "regular" fonts rather than symbol fonts or for a particular language, so perhaps they shouldn't have the representative text at all?


It's also not clear why the fonts STIXSize{One,Two,Three,Four,Five}Sym have such varied representative text when it sounds like they should be the same


See following attachments
Comment 20 Matthew Francis 2014-08-16 09:45:03 UTC
Created attachment 104716 [details]
Round 2: Hoefler Text and Iowan Old Style as rendered in 4.3.0.4
Comment 21 Matthew Francis 2014-08-16 09:45:32 UTC
Created attachment 104717 [details]
Round 2: Hoefler Text and Iowan Old Style as rendered in 4.4 master
Comment 22 Matthew Francis 2014-08-16 09:46:19 UTC
Created attachment 104718 [details]
Round 2: STIXSize(One,Two,Three,Four,Five)Sym as rendered in 4.4 master
Comment 23 Matthew Francis 2014-08-19 04:50:19 UTC
Another peculiarity (not directly related, but it seems overkill to raise a new bug just for this):

The standard font "GB18030 Bitmap" has the representative text "日本語" (i.e. "Japanese"), but going by the name this ought to be a Chinese font

(-> http://en.wikipedia.org/wiki/GB_18030 )

Japanese certainly looks pretty ugly rendered in it, probably due to characters being handled through fallback
Comment 24 Caolán McNamara 2014-08-26 15:49:55 UTC
"Iowan Old Style" isn't appearing in LibreOffice under Linux at all, even though fc-list shows it and "Hoefler Text" is only showing the "Hoefler Text Ornaments" variant, and not the other one. Looks like there is a deeper font-detection/parsing bug here which the preview is just a symptom of.

The "STIXSize(One,Two,Three,Four,Five)Sym" don't all have the same code points in them, as you can see from insert->special character and changing the fonts. If someone wants to check if there is some representative subset of symbols which they all have then it wouldn't be a biggy to hard-code that into LibreOffice for their previews. But for the moment, different previews there isn't a bug.

NISC GB18030 I don't have under Linux, but it might be a bug in attemptToDisambiguateHan
Comment 25 Commit Notification 2014-08-26 16:01:42 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=69638beaba0dbb0a7bc6ad66bbf940325f34900b

Related: fdo#82259 possible solution to 'GB18030 Bitmap' detected as Japanese



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 26 Matthew Francis 2014-08-27 13:25:03 UTC
Unfortunately that patch doesn't make a difference. attemptToDisambiguateHan() doesn't seem to be called for "GB18030 Bitmap".

The confusion may have something to do with the fact that, remarkably enough, the font has the Unicode range "Phoenician" set in its OS/2 table and nothing else. This would be a tiny bit of a prevarication, and may be a symptom of confusion in some font generation tool - Phoenician is bit 58, and 58 is coincidentally the magic number corresponding to the size of a pre-version 1 TTF OS/2 table (see GetTTCoverage() in core/vcl/source/fontsubset/sft.cxx)

Thus, within makeShortRepresentativeTextForSelectedFont() in core/svtools/source/misc/sampletext.cxx, getScript() returns USCRIPT_PHOENICIAN, and attemptToDisambiguateHan() doesn't even attempt to do anything, leading to an empty string being returned.

Then, back in FontNameBox::UserDraw() in core/svtools/source/control/ctrlbox.cxx, we hit a fallback loop which tries to render sample text in a fixed list of languages, within which Japanese happens to come before Chinese Traditional/Simplified.


Is this the point where we're allowed to throw up our hands and hard code it as a special case?
Comment 27 Caolán McNamara 2014-08-27 15:28:09 UTC
Phoenician, eh. Heh.

Yeah, sure, I'll accept a patch that hard-codes the sampletext for "GB18030 Bitmap" to the Simplified Chinese given that its installed on MacOSX by default
Comment 28 Matthew Francis 2014-08-31 17:56:47 UTC
Submitted a patch - https://gerrit.libreoffice.org/#/c/11213/

This is also to note that the following default fonts on OSX 10.9 could have representative text but currently don't. Some languages may be missing text entirely, as in the case of Armenian which I saw you added. Others appear to have close relatives which already have text, and may indicate other LO or font bugs. I will have a look at at least the CJK ones when I get a round tuit.

Bangla MN: Bengali
Bangla Sanga MN: Bengali
BiauKai: Traditional Chinese
Gungseo: Korean
Gurmukhi MN: Punjabi
Gurmukhi Sangam MN: Punjabi
Hannotate TC: Traditional Chinese
HanziPen TC: Traditional Chinese
Hei: Chinese (both)
Heiti SC: Simplified Chinese
Heiti TC: Traditional Chinese
InaiMathi: Hindi
Kai: Chinese (both)
Kannada MN: Kannada
Kannada Sangam MN: Kannada
Lao Sangam NM: Lao
Mayalayam MN: Mayalayam
Myanmar MN: Myanmar
PC Myungjo: Korean
PilGi: Korean
Sinhala MN: Sinhala
Telugu MN: Telugu
Weibei TC: Traditional Chinese

And there's one final funny right at the end of the list:
The font "Zapfino" has a special word form for the precise text "Zapfino" which has a long horizontal tail on the "Z" and an extra tall curly "f". Not sure what could be done about that, but the fact it's scaled in the font list so the height of the "f" then fits in means that the text is nigh illegible...
Comment 29 Matthew Francis 2014-08-31 18:10:28 UTC
For comparison, Word for Mac appears to render "Zapfino" in some other neutral font within the font list
Comment 30 Commit Notification 2014-09-02 21:02:19 UTC
Matthew J. Francis committed a patch related to this issue.
It has been pushed to "master":

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

fdo#82259 Hardcode script for "GB18030 Bitmap"



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 31 Commit Notification 2014-09-12 09:30:20 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=02f8f895f2abc4ee090b4bd42963590aa018fb49

Related: fdo#82259 support version 2 ttc fonts on Linux



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 32 Commit Notification 2014-09-12 09:30:33 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9436ae99438ccc24a86aff61aaa9174a9686814f

Related: fdo#82259 implement mac ttf fontname encoding support



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 33 Commit Notification 2014-09-12 13:46:14 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Related: fdo#82259 various "* MN" fonts incorrectly claim to support TAMIL



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 34 Commit Notification 2014-09-12 16:07:25 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0e076a0a57a7d73ff2480e3642fd157585110a22

Related: fdo#82259 we don't actually care about the ttf version here



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 35 Commit Notification 2014-09-12 16:07:40 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=92f4c7418ff786146eb23a5a0b6bcaaec6ae7065

Related: fdo#82259 BiauKai makes some crazy claims



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 36 Commit Notification 2014-09-13 09:20:52 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6ceff3f7deb1a6b66c0119c73b797a925f8fbee7

Related: fdo#82259 GungSeo has no OS/2 table



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 37 Caolán McNamara 2014-09-13 13:22:34 UTC
Seems to be that the default Mac fonts are way more messy than the MS or Linux ones in terms of their claimed unicode code block coverage or wrt not having OS/2 tables.

Good thing though is that Linux LibreOffice now has mac ttf fontname encoding support and support for version 2 ttc fonts so now a lot more fonts work that didn't beforehand.
Comment 38 Yousuf Philips (jay) (retired) 2014-09-13 16:20:12 UTC Comment hidden (off-topic)
Comment 39 Adolfo Jayme 2014-09-13 16:46:19 UTC Comment hidden (off-topic)
Comment 40 Ashod Nakashian 2015-02-03 13:14:39 UTC
This issue needs to be verified against a very recent commit as there were changes to the TTF data parsing.

Please reopen or confirm in comment accordingly.
Comment 41 Ashod Nakashian 2015-02-05 12:26:35 UTC
Please open a *new* ticket if the issue persists and link this for background.