You are not logged in.

#1 2014-06-26 10:52:24

wzyboy
Member
Registered: 2012-01-21
Posts: 11

[Workaround available] Some ttc fonts not shown in Libreoffice

This is a prolonged (for more than 1 years maybe) issue for me: My LibreOffice installation does not recognize any ttc fonts. (And I cannot bear this anymore for some reason)

ttc fonts are merely a comination of two or more ttf fonts. I have installed both ttf and ttc fonts in /usr/share/fonts/TTF directory either by copying them into the directory and run `fc-cache -fv` or by installing those font packages in repositories. But LibreOffice can only recognize those ttf fonts, not ttc ones.

* I have tried both "libreoffice-writer" and "libreoffice-fresh" packages from official repositories, with "~/.config/libreoffice" deleted.
* I have no "~/.font*" or "~/.confg/fontconfig" directory.
* Those ttc fonts I installed CAN be recognized in any other "Select font" dialog.
* I tried Abiword and it CAN also recognized those ttc fonts.
* Not a single ttc font, but all the ttc fonts cannot be recognized by LibreOffice.

Any ideas?

UPDATE:

I found out that some of the ttc fonts can actually be recognized by LibreOffice, others, however, can not.

$ find /usr/share/fonts -name *.ttc
/usr/share/fonts/TTF/msgothic.ttc # NO
/usr/share/fonts/TTF/mingliub.ttc # NO
/usr/share/fonts/TTF/msjh.ttc # NO
/usr/share/fonts/TTF/batang.ttc # YES
/usr/share/fonts/TTF/ukai.ttc # YES
/usr/share/fonts/TTF/simsun.ttc # NO
/usr/share/fonts/TTF/uming.ttc # YES
/usr/share/fonts/TTF/msyhl.ttc # NO
/usr/share/fonts/TTF/msjhl.ttc # NO
/usr/share/fonts/TTF/mingliu.ttc # NO
/usr/share/fonts/TTF/meiryob.ttc # NO
/usr/share/fonts/TTF/msmincho.ttc # NO
/usr/share/fonts/TTF/msyh.ttc # NO
/usr/share/fonts/TTF/meiryo.ttc # NO
/usr/share/fonts/TTF/gulim.ttc # YES
/usr/share/fonts/TTF/msyhbd.ttc # NO
/usr/share/fonts/TTF/msjhbd.ttc # NO
/usr/share/fonts/wenquanyi/wqy-microhei/wqy-microhei.ttc # YES

Here is all the ttc fonts I have installed. "ukai.ttc" is from ttf-arphic-ukai package, and "wqy-microhei.ttc" is from wqy-microhei package. All the others come from aur/ttf-ms-win8. I copied these fonts from a Windows 8.1 installation media and the integrity check is passed.

Only five of them (those with "YES" marks) are listed in LibreOffice. The others are not.

I am very confused.



UPDATE 2:

It seems that this is a prolonged bug in LibreOffice. I modified the PKGBUILD file of aur/ttf-ms-win8, spliting those ttc files into ttf files.

Last edited by wzyboy (2014-06-27 06:36:11)

Offline

#2 2014-07-02 04:09:14

reflexing
Member
Registered: 2009-03-25
Posts: 58
Website

Re: [Workaround available] Some ttc fonts not shown in Libreoffice

As a maintainer of ttf-ms-win8 package, I needed exactly that information, was too lazy to check it by myself. I think I add extracting of those ttc's soon.

You just added them to 'ttcs_to_extract', don't you?

Offline

#3 2014-07-02 04:45:04

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: [Workaround available] Some ttc fonts not shown in Libreoffice

wzyboy wrote:

Yes, here is the modified part:

case "$1" in
$pkgbase)
ttcs_to_extract=(cambria.ttc Sitka*.ttc);;
$pkgbase-japanese)
ttcs_to_extract=(meiryo*.ttc msgothic.ttc msmincho.ttc)
pkgdesc="Microsoft Windows 8.1 Japanese TrueType fonts";;
$pkgbase-korean)
ttcs_to_extract=(batang.ttc gulim.ttc)
pkgdesc="Microsoft Windows 8.1 Korean TrueType fonts";;
$pkgbase-zh_cn)
ttcs_to_extract=(msyh*.ttc simsun.ttc)
pkgdesc="Microsoft Windows 8.1 Simplified Chinese TrueType fonts";;
$pkgbase-zh_tw)
ttcs_to_extract=(mingliu*.ttc msjh*.ttc)
pkgdesc="Microsoft Windows 8.1 Traditional Chinese TrueType fonts" ;;
esac

I only need the CJK part, so I did not test -arbaic or other writing systems.

Moderator:  I have a hunch you meant to hit the reply link; not the report link -- Just in case you were wondering where your post went.
It happens more often than you might imagine.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#4 2014-07-02 04:48:23

wzyboy
Member
Registered: 2012-01-21
Posts: 11

Re: [Workaround available] Some ttc fonts not shown in Libreoffice

reflexing wrote:

As a maintainer of ttf-ms-win8 package, I needed exactly that information, was too lazy to check it by myself. I think I add extracting of those ttc's soon.

You just added them to 'ttcs_to_extract', don't you?

Yes, here is the modified part:

    case "$1" in
        $pkgbase)
            ttcs_to_extract=(cambria.ttc Sitka*.ttc);;
        $pkgbase-japanese)
            ttcs_to_extract=(meiryo*.ttc msgothic.ttc msmincho.ttc)
            pkgdesc="Microsoft Windows 8.1 Japanese TrueType fonts";;
        $pkgbase-korean)
            ttcs_to_extract=(batang.ttc gulim.ttc)
            pkgdesc="Microsoft Windows 8.1 Korean TrueType fonts";;
        $pkgbase-zh_cn)
            ttcs_to_extract=(msyh*.ttc simsun.ttc)
            pkgdesc="Microsoft Windows 8.1 Simplified Chinese TrueType fonts";;
        $pkgbase-zh_tw)
            ttcs_to_extract=(mingliu*.ttc msjh*.ttc)
            pkgdesc="Microsoft Windows 8.1 Traditional Chinese TrueType fonts" ;;
    esac

I only need the CJK part, so I did not test -arbaic or other writing systems.

Offline

#5 2014-07-02 04:49:27

wzyboy
Member
Registered: 2012-01-21
Posts: 11

Re: [Workaround available] Some ttc fonts not shown in Libreoffice

ewaller wrote:

Moderator:  I have a hunch you meant to hit the reply link; not the report link -- Just in case you were wondering where your post went.
It happens more often than you might imagine.

Yes, exactly. I had too few sleep last night. Sorry.

I have re-posted that post...

Offline

#6 2014-07-02 05:02:16

reflexing
Member
Registered: 2009-03-25
Posts: 58
Website

Re: [Workaround available] Some ttc fonts not shown in Libreoffice

wzyboy wrote:
reflexing wrote:

As a maintainer of ttf-ms-win8 package, I needed exactly that information, was too lazy to check it by myself. I think I add extracting of those ttc's soon.

You just added them to 'ttcs_to_extract', don't you?

Yes, here is the modified part:

Nice, that's what I wrote that function for! I will update package based on your findings soon.

Offline

#7 2014-07-02 05:11:04

wzyboy
Member
Registered: 2012-01-21
Posts: 11

Re: [Workaround available] Some ttc fonts not shown in Libreoffice

reflexing wrote:
wzyboy wrote:
reflexing wrote:

As a maintainer of ttf-ms-win8 package, I needed exactly that information, was too lazy to check it by myself. I think I add extracting of those ttc's soon.

You just added them to 'ttcs_to_extract', don't you?

Yes, here is the modified part:

Nice, that's what I wrote that function for! I will update package based on your findings soon.


Wow! I love your function, too!

However, please note, that spliting those CJK fonts will result in very large package sizes. A typical Chinese ttc font is about ~35 MiB and contains 2 - 4 font weights (styles), so there will be 2 - 4 ttf files, which have a total size of ~150 MiB or more.

49M	ttf-ms-win8-6.3.9600.17050-1-any.pkg.tar
163M	ttf-ms-win8-japanese-6.3.9600.17050-1-any.pkg.tar
70M	ttf-ms-win8-korean-6.3.9600.17050-1-any.pkg.tar
161M	ttf-ms-win8-zh_cn-6.3.9600.17050-1-any.pkg.tar
254M	ttf-ms-win8-zh_tw-6.3.9600.17050-1-any.pkg.tar

These are the packages my modified PKGBUILD generated. You can see how large they are compared to those ttc versions. And the only reason to split ttcs is that LibreOffice has a bug recognizing them. (Other programs recognize ttcs well)

Offline

Board footer

Powered by FluxBB