Bug 751 - Google droid sans show Chinese characters as unreadable squares in libreoffice
Summary: Google droid sans show Chinese characters as unreadable squares in libreoffice
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 2
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: D Morgan
QA Contact:
URL:
Whiteboard: MGA1TOO
Keywords:
: 815 2595 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-04-10 01:23 CEST by Jiang Yike
Modified: 2013-06-06 16:26 CEST (History)
9 users (show)

See Also:
Source RPM: google-droid-fonts, libreoffice
CVE:
Status comment:


Attachments
droid sans fallback (27.01 KB, image/png)
2011-04-14 04:59 CEST, You-Cheng Hsieh
Details
bug reference screenshot (24.62 KB, image/png)
2011-04-14 05:01 CEST, You-Cheng Hsieh
Details
SScreenshot of wanted result (6.24 KB, image/png)
2011-05-19 05:05 CEST, You-Cheng Hsieh
Details

Description Jiang Yike 2011-04-10 01:23:08 CEST
There are two problems about LibreOffice in Mageia.

1. If the Chinese texts of a document (for example .doc or .ppt, and doesn't test .xls) are set as a Chinese font but the system lacks the font, LibreOffice will show the Chinese characters as unreadable squares.

2. If choosing an English font and type Chinese characters, Chinese characters will be shown as unreadable squares, too.

It seems that LibreOffice (for Windows and original rpms for Linux) and OpenOffice.org don't have such problems. If a system lack a Chinese font, Chinese characters will be shown as the default CJK font in the office software. If choosing an English font and type Chinese characters, Chinese characters also will be shown as the default CJK font.

I hope that LibreOffice in Mageia will solve the problems. Thanks!

Reproducible: 

Steps to Reproduce:
Ahmad Samir 2011-04-10 04:01:49 CEST

Assignee: bugsquad => dmorganec
Source RPM: LibreOffice => libreoffice

Comment 1 You-Cheng Hsieh 2011-04-14 04:59:06 CEST
Created attachment 236 [details]
droid sans fallback

A workaround is to set asian font to "droid sans fallback" so that it can display asian characters correctly. The default asian font is "droid sans".

This workaround does not fix this bug, until anyone can figure out the real problem and fix it.
Comment 2 You-Cheng Hsieh 2011-04-14 05:01:26 CEST
Created attachment 237 [details]
bug reference screenshot

The attached screenshot show how Chinese font is displayed when english font is selected.
Comment 3 You-Cheng Hsieh 2011-04-14 05:03:25 CEST
I changed platform to "All" since my system arch is i586.

CC: (none) => yochenhsieh
Hardware: x86_64 => All

Comment 4 Jiang Yike 2011-04-27 12:20:23 CEST
I think that the bug should be fixed quickly since Mageia has released Beta 2, because it is a serious problem for Chinese users. It is very inconvenient to read Chinese documents which are created on Windows, especially read Excel/PowerPoint documents (It is not easy to change fonts when reading such kinds of documents).

Severity: normal => critical

You-Cheng Hsieh 2011-05-18 03:59:37 CEST

Source RPM: libreoffice => libreoffice-3.3.2.2-13.mga1

Comment 5 You-Cheng Hsieh 2011-05-19 05:05:23 CEST
Created attachment 426 [details]
SScreenshot of wanted result

The screenshot showing Chinese character typed in writer while a font which does not include Chinese is selected. Note that Chinese character can be still displayed with a default system Chinese font.
Comment 6 Jiang Yike 2011-07-16 01:34:38 CEST
When installing a Chinese language pack for LibreOfficeâ, "bitmap-fangsongti-fonts" instead of "google-droid-sans-fonts" is chosen to be the dependency font, and the problem will be avoided.

If "google-droid-sans-fonts" has been installed as the dependency font of LibreOffice, you should uninstall it and install "bitmap-fangsongti-fonts", and the problem will be solved, too.

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 7 You-Cheng Hsieh 2011-07-16 03:40:03 CEST
libreoffice-langpack-zh_TW needs google-droid-sans-fonts, therefore removing droid fonts means no localized UI for zh_TW.

Even though bitmap-fangsonti will fix the bug, that means anyone who want to use Libreoffice in Chinese cannot have droid fonts installed. This is only a workaround, not fix.

Status: RESOLVED => REOPENED
Resolution: FIXED => (none)

Comment 8 Marja Van Waes 2011-10-08 21:25:05 CEST
@ Jiang Jike
@ D Morgan

We're on a newer version of Libreoffice now, did the problem get solved?

CC: (none) => marja11

Comment 9 Jiang Yike 2011-10-12 15:06:12 CEST
No, the problem still exists in Libreoffice 3.3.3.1-0.1.mga1.

(In reply to comment #8)
> @ Jiang Jike
> @ D Morgan
> 
> We're on a newer version of Libreoffice now, did the problem get solved?
Comment 10 Christian Lohmaier 2011-10-23 02:58:13 CEST
a newer version of LibreOffice won't fix the problem since it is using fontconfig for the font-replacement.

LibreOffice will only look at the explicitly listed fallbacks in VCL.xcu and when there's no match rely on fontconfig to provide a fallback font.

http://lists.fedoraproject.org/pipermail/i18n/attachments/20081123/fcaaa127/attachment.rdf

(from http://lists.fedoraproject.org/pipermail/i18n/2008-November/000830.html )

probably will do the trick. (put in /etc/fonts/conf.d like 50-doidfont.conf or similar)

as for why there are squares otherwise: The replacement for the bitmap font is restricted to a couple of fixed font-sizes. It's a bitmap font after all.

Use font-size of 16 or 12 should display OK (at 100% Zoom), with other sizes you need to zoom in/out to reach a display size of 16 or 12pt.

But the much better solution is to use an explicitly configured UI font, and have the fallback be a vector font.

A LibreOffice specific fix would be to add the font to VCL.xcu as an explicit fallback (VCL.xcu gets merged into main.xcd when building)

CC: (none) => lohmaier+mageia

Comment 11 Christian Lohmaier 2011-10-23 03:14:40 CEST
*** Bug 815 has been marked as a duplicate of this bug. ***
Comment 12 Christian Lohmaier 2011-10-23 03:49:59 CEST
*** Bug 2595 has been marked as a duplicate of this bug. ***

CC: (none) => franklin

You-Cheng Hsieh 2011-10-24 08:02:18 CEST

CC: (none) => i18n-zh_tw

Comment 13 You-Cheng Hsieh 2011-10-24 08:50:42 CEST
(In reply to comment #10)
> 
> A LibreOffice specific fix would be to add the font to VCL.xcu as an explicit
> fallback (VCL.xcu gets merged into main.xcd when building)

Will that fix be applied to Mageia 1's libreoffice as core update? I can't ask users to install Cauldron, if it does fix this bug.
Comment 14 Jiang Yike 2011-10-24 11:27:58 CEST
(In reply to comment #13)
> 
> Will that fix be applied to Mageia 1's libreoffice as core update? I can't ask
> users to install Cauldron, if it does fix this bug.


I use Cauldron now. The lastest version of LibreOffice in Cauldron still has the problem.
Comment 15 Christian Lohmaier 2011-11-18 00:05:14 CET
(In reply to comment #13)
> (In reply to comment #10)
> > 
> > A LibreOffice specific fix would be to add the font to VCL.xcu as an explicit
> > fallback (VCL.xcu gets merged into main.xcd when building)
> 
> Will that fix be applied to Mageia 1's libreoffice as core update?

I would not advise to fix it for LibreOffice only. The bug should to be fixed at the fontconfig level.

> I can't ask
> users to install Cauldron, if it does fix this bug.

Did you try whether the fontconfig rule did help?
Comment 16 Marja Van Waes 2012-02-22 13:30:53 CET
Pinging, because nothing has happened with this report for more than 3 months, it still has the status NEW or REOPENED.

(version is 3.4.4.2-0.3.mga1 now, btw, and a newer LO is in updates/testing)
Comment 17 You-Cheng Hsieh 2012-02-23 04:45:04 CET
First, the fontconfig rule didn't help:(
Bug is valid in both LibreOffice 3.5.0.3-3.mga2 (cauldron) and 3.4.4.2-0.3.mga1.
Comment 18 Jiang Yike 2012-02-26 01:56:38 CET
The bug is valid in Mageia 2 beta 1 x86_64.
Manuel Hiebel 2012-02-26 11:09:31 CET

Source RPM: libreoffice-3.3.2.2-13.mga1 => libreoffice

Comment 19 Chih Wei Yao 2012-02-27 16:52:15 CET
I just install the beta1 from the DVD iso in VM, I can't reproduce the bug.

Jiang Yike, your system is a upgraded one or a fresh installed one?

CC: (none) => elegant.pegasus

Comment 20 Jiang Yike 2012-02-28 00:09:24 CET
My computer's Mageia 2 beta 1 is a fresh installed system from DVD. The default font of LibreOffice is Droid Sans. The bug is still valid.
Comment 21 You-Cheng Hsieh 2012-02-28 03:57:00 CET
(In reply to comment #19)
> I just install the beta1 from the DVD iso in VM, I can't reproduce the bug.
> Jiang Yike, your system is a upgraded one or a fresh installed one?

Chih-Wei, does your install have google-droid-sans-fonts installed?
I've tried a new beta1 install:

- install from DVD and don't select office. 
- after first boot, choose to install libreoffice in rpmdrake, 
- a dialog will ask to select fonts, select fonts-ttf-chinese-opendesktop
- after libreoffice installed, AR PL UMing CN will be default font in writer, therefore it looks like fixed.

however, if you install google-droid-sans-fonts, 
- the default font in writer will be Droid Sans, even if you still have fonts-ttf-chinese-opendesktop.

It seems droid sans is on higher priority than other Chinese fonts, but libreoffice (still) doesnot using any Chinese fonts for fallback.
Comment 22 Chih Wei Yao 2012-02-28 06:59:11 CET
I had confirmed the problem later on Libreoffice Darw and Writer. Most of the menu and the display is corrected, but some small label is displayed in cube.

Can we directly setup the setting to AR PL UMing for Chinese user as a special setup?
Comment 23 You-Cheng Hsieh 2012-02-29 06:24:23 CET
Please try delete the following files:
/etc/fonts/conf.d/65-google-droid-sans.conf
/etc/fonts/conf.d/60-google-droid-sans-mono.conf
/etc/fonts/conf.d/59-google-droid-serif.conf

I think that will fix the problem. Please report if removing them causes any side-effects.
Comment 24 Jiang Yike 2012-02-29 10:27:10 CET
I only found /etc/fonts/conf.d/65-google-droid-sans.conf. After deleting this file, LibreOffice's default font is changed to ææ³é©¿å¾®ç±³é», and it can directly show Chinese characters. But when the font is set to Droid Sans, Chinese characters will be shown as unreadable squares. Does Droid Sans have a problem?
Comment 25 You-Cheng Hsieh 2012-03-01 05:36:39 CET
After removed the droid sans fontconfig rules, I tried all droid sans fonts in libreoffice writer.
Droid Sans Fallback - can show Chinese directly
Droid Sans Japanese - can show Chinese in Japanese Han character.
Droid Sans Thai, Droid Sans Hebrew and other fonts that don't contain Chinese characters - will use default Chinese font for fallback.

So our problems narrow down to only "Droid Sans" - specifically, it cannot show fallback Chinese characters, no matter there's fontconfig rules or not. 

I would like to suggest the following:
- Change the rpm package of this bug to google-droid-fonts.
- remove the fontconfig rules and rebuild google-droid-fonts for cauldron and mageia 1 core updates.(D Morgan?) 

The above partially fix our problem, only left Droid Sans bugged. At least libreoffice is now usable.

(To do)
- find a way (in fontconfig?) to really fix fallback for Droid Sans.

Suggestions are welcomed.
Comment 26 Marja Van Waes 2012-03-17 16:12:17 CET
(In reply to comment #25)
> After removed the droid sans fontconfig rules, I tried all droid sans fonts in
> libreoffice writer.
> Droid Sans Fallback - can show Chinese directly
> Droid Sans Japanese - can show Chinese in Japanese Han character.
> Droid Sans Thai, Droid Sans Hebrew and other fonts that don't contain Chinese
> characters - will use default Chinese font for fallback.
> 
> So our problems narrow down to only "Droid Sans" - specifically, it cannot show
> fallback Chinese characters, no matter there's fontconfig rules or not. 
> 
> I would like to suggest the following:
> - Change the rpm package of this bug to google-droid-fonts.
> - remove the fontconfig rules and rebuild google-droid-fonts for cauldron and
> mageia 1 core updates.(D Morgan?) 
> 
> The above partially fix our problem, only left Droid Sans bugged. At least
> libreoffice is now usable.
> 
> (To do)
> - find a way (in fontconfig?) to really fix fallback for Droid Sans.
> 
> Suggestions are welcomed.

CC'ing Funda Wang, who wasn't in the cc of this bug yet and who might (I hope) have more time than D Morgan

CC: (none) => fundawang

Comment 27 Jiang Yike 2012-03-17 23:53:34 CET
Today after installing an update of google-droid-sans on Cauldron, the default font of LibreOffice is changed to WQY MicroHei, and Chinese characters can be properly shown. But if the font is chosen to Droid Sans, the characters will be shown as unreadable squares. Therefore, the bug's title can be changed to "Google Droid Sans show Chinese characters as unreadable squares", and the bug's related rpm package is google-droid-sans.
Comment 28 You-Cheng Hsieh 2012-03-18 03:04:57 CET
Changed bug title and srpm package. 
Since the affect range of this bug is reduced to only droid sans in libreoffice, I also changed severity to "Normal".

Note that if I select droid sans in kde font setting, Chinese characters can be correctly displayed. This bug may still have something to do with libreoffice.

Summary: Chinese characters are shown as unreadable squares when lacking a font => Google droid sans show Chinese characters as unreadable squares in libreoffice
Source RPM: libreoffice => google-droid-fonts, libreoffice
Severity: critical => normal

Comment 29 Marja Van Waes 2012-05-26 13:08:27 CEST
Hi,

This bug was filed against cauldron, but we do not have cauldron at the moment.

Please report whether this bug is still valid for Mageia 2.

Thanks :)

Cheers,
marja

Keywords: (none) => NEEDINFO

Comment 30 Jiang Yike 2012-05-26 16:29:04 CEST
The bug is valid in Mageia 2.
Sander Lepik 2012-05-26 16:39:53 CEST

Keywords: NEEDINFO => (none)
CC: (none) => sander.lepik

Marja Van Waes 2012-05-28 18:15:49 CEST

Whiteboard: (none) => MGA2TOO

Comment 31 You-Cheng Hsieh 2012-06-13 03:21:32 CEST
Seems fixed in latest Cauldron. However, there wasn't any libreoffice or droidfont updates recently. Is there any way to track which package is need to fix this bug?
You-Cheng Hsieh 2012-06-13 05:14:15 CEST

Version: Cauldron => 2
Whiteboard: MGA2TOO => MGA1TOO

Comment 32 Marja Van Waes 2012-07-06 15:04:54 CEST
Please look at the bottom of this mail to see whether you're the assignee of this  bug, if you don't already know whether you are.


If you're the assignee:

We'd like to know for sure whether this bug was assigned correctly. Please change status to ASSIGNED if it is, or put OK on the whiteboard instead.

If you don't have a clue and don't see a way to find out, then please put NEEDHELP on the whiteboard.

Please assign back to Bug Squad or to the correct person to solve this bug if we were wrong to assign it to you, and explain why.

Thanks :)

**************************** 

@ the reporter and persons in the cc of this bug:

If you have any new information that wasn't given before (like this bug being valid for another version of Mageia, too, or it being solved) please tell us.

@ the reporter of this bug

If you didn't reply yet to a request for more information, please do so within two weeks from now.

Thanks all :-D
Comment 33 Pablo Saratxaga 2013-06-06 16:26:42 CEST
I tested on Cauldron (4):

urpmi google-droid-sans-fonts
urpmi locales-zh
LC_ALL=zh_CN.UTF-8 date > a.txt
libreoffice a.txt

then selected "Droid Sans" and chinese characters show correctly.
so it seems to be fixed.

Status: REOPENED => RESOLVED
CC: (none) => pablo
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.