Bug 113532 - Bundle and use open source Arabic fonts by default
Summary: Bundle and use open source Arabic fonts by default
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha1+
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:6.1.0 target:6.0.1 target:6.0.0
Keywords:
Depends on: 115226
Blocks: RTL-Arabic Fonts-Locale 103080
  Show dependency treegraph
 
Reported: 2017-10-30 18:58 UTC by Yousuf Philips (jay) (retired)
Modified: 2018-02-16 13:59 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
mac OS X arabic fonts (103.28 KB, application/pdf)
2017-11-24 10:04 UTC, Yousuf Philips (jay) (retired)
Details
windows arabic fonts (234.93 KB, application/pdf)
2017-11-24 12:16 UTC, Yousuf Philips (jay) (retired)
Details
DecoType Naskh and Apple Arabic Default (59.14 KB, application/pdf)
2017-11-24 12:37 UTC, Yousuf Philips (jay) (retired)
Details
open source arabic fonts grouped based on look/style (265.75 KB, application/pdf)
2017-11-24 23:50 UTC, Yousuf Philips (jay) (retired)
Details
arabic monospace fonts (23.07 KB, image/png)
2017-12-21 18:46 UTC, Yousuf Philips (jay) (retired)
Details
default sans font selection (11.76 KB, image/png)
2017-12-21 19:38 UTC, Yousuf Philips (jay) (retired)
Details
various heading and text body combinations (99.76 KB, application/pdf)
2017-12-21 20:28 UTC, Yousuf Philips (jay) (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2017-10-30 18:58:09 UTC
LibreOffice currently prefers to use proprietary arabic fonts[1] when available rather than open source fonts and this doesn't improve the interoperability of documents. So similar to LO bundling open source fonts like Liberation and DejaVu fonts to ensure interoperability of latin-based documents, we should bundle a few arabic fonts and default to use them.

I would like to recommend bundling

* Khaled's Amiri font (similar to Arabic Typesetting)
* KACSTOffice from Arabeyes Project (similar to Simplified Arabic)
* Scheherazade from SIL International (similar to Traditional Arabic)
* A few Kufi styled fonts from Arabeyes - Al Arabiya, Granada, and/or Mashq
* Tholoth from Arabeyes Project as a Thuluth styled font

For writer, we would default to either Amiri or KACSTOffice.
For calc, we could default to DejaVu Sans, as it is the closest sans-like arabic font available similar to Tahoma.

[1] https://opengrok.libreoffice.org/xref/core/officecfg/registry/data/org/openoffice/VCL.xcu#152
Comment 1 Khaled Hosny 2017-10-31 14:08:11 UTC
I’d stay away from Arabeyes fonts as their legal status is fuzzy. The KACST fonts should be OK if KACST is still distributing them, but they don’t and there exact license terms are not clear.
Comment 2 Yousuf Philips (jay) (retired) 2017-11-01 12:25:28 UTC
Khaled: For Arabeyes fonts, is there some link you can provide that has more details of what the fuzzy legal status relates to? For KACST fonts, not sure why them not distributing them any longer would results in the GPL license of the fonts to be not clear.

Do you have any recommendations on which open source arabic fonts that you think we should bundle?
Comment 3 Khaled Hosny 2017-11-01 14:45:44 UTC
(In reply to Yousuf Philips (jay) from comment #2)
> Khaled: For Arabeyes fonts, is there some link you can provide that has more
> details of what the fuzzy legal status relates to?

No link. Arabeyes do not design these fonts (I know be cause I used to maintain them at some point) and the person who released these fonts under GPL never answered my queries about the source of these fonts. Some web search should reveal that some of these fonts are still distributed elsewhere by their original designers under a non-free license.

> For KACST fonts, not sure
> why them not distributing them any longer would results in the GPL license
> of the fonts to be not clear.

The fonts were not accompanied by a LICENSE file, only a copyright notice inside the fonts referring to GPL without specifying a license version. If they were still distributed by KACST hopefully a LICENSE file would be present or some one would answer queries about the license (again, my attempts to clarify this went nowhere).

> Do you have any recommendations on which open source arabic fonts that you
> think we should bundle?

There are not that many free Arabic fonts actually, in addition to the sources you mentioned there is also Google Fonts: https://fonts.google.com/?subset=arabic
Comment 4 Yousuf Philips (jay) (retired) 2017-11-01 21:01:36 UTC
(In reply to Khaled Hosny from comment #3)
> No link. Arabeyes do not design these fonts (I know be cause I used to
> maintain them at some point) and the person who released these fonts under
> GPL never answered my queries about the source of these fonts. Some web
> search should reveal that some of these fonts are still distributed
> elsewhere by their original designers under a non-free license.

Quite unfortunate that this is the case (though i knew you used to maintain them :D).

> The fonts were not accompanied by a LICENSE file, only a copyright notice
> inside the fonts referring to GPL without specifying a license version. If
> they were still distributed by KACST hopefully a LICENSE file would be
> present or some one would answer queries about the license (again, my
> attempts to clarify this went nowhere).

It is mentioned in the font description that "KACST holds the copyright of the included Arabic font which is donated under GPL by KACST", so as they didnt mention which version of the GPL, we shouldn't distribute it?

> There are not that many free Arabic fonts actually, in addition to the
> sources you mentioned there is also Google Fonts:
> https://fonts.google.com/?subset=arabic

Have seen the fonts at google fonts before, do you have any recommendations?
Comment 5 Khaled Hosny 2017-11-03 00:15:29 UTC
(In reply to Yousuf Philips (jay) from comment #4)
> (In reply to Khaled Hosny from comment #3)
> > The fonts were not accompanied by a LICENSE file, only a copyright notice
> > inside the fonts referring to GPL without specifying a license version. If
> > they were still distributed by KACST hopefully a LICENSE file would be
> > present or some one would answer queries about the license (again, my
> > attempts to clarify this went nowhere).
> 
> It is mentioned in the font description that "KACST holds the copyright of
> the included Arabic font which is donated under GPL by KACST", so as they
> didnt mention which version of the GPL, we shouldn't distribute it?

IANAL, but there is no single GPL license, there is version 1, 2 or 3 and they are not compatible so you need to know the exact version to know if you can distribute it and whether it is compatible with LibreOffice license or not.
Comment 6 Yousuf Philips (jay) (retired) 2017-11-03 11:31:22 UTC
(In reply to Khaled Hosny from comment #5)
> IANAL, but there is no single GPL license, there is version 1, 2 or 3 and
> they are not compatible so you need to know the exact version to know if you
> can distribute it and whether it is compatible with LibreOffice license or
> not.

We used to distribute Liberation fonts that were GPLv2, so it is fine to bundle it with LO for whatever GPL version is implied, as the GPL doesnt restrict distribution, else debian wouldn't have them in their repo.

IRC quotes:
<quikee> jphilipz: Liberation v1 were GPLv2 licensed AFAIK and we bundled those, the new Liberation fonts are SIL licensed as they are now a rebased variant of croscore fonts

mmeeks> jphilipz: prefer not to really - if possible - but much prefer it to some random non-license
Comment 7 Yousuf Philips (jay) (retired) 2017-11-10 22:26:11 UTC
Ran a poll on twitter[1] and here are the results from the 129 votes for "Which open source font should be used as the default Arabic font for documents?"

Amiri (44%)
XB Niloofar (24%)
KACSTOffice (22%)
Scheherazade (10%)

[1] https://twitter.com/liboDesign/status/926418319728660480
Comment 8 Khaled Hosny 2017-11-11 05:43:36 UTC
(In reply to Yousuf Philips (jay) from comment #7)
> Ran a poll on twitter[1] and here are the results from the 129 votes for
> "Which open source font should be used as the default Arabic font for
> documents?"
> 
> Amiri (44%)
> XB Niloofar (24%)
> KACSTOffice (22%)
> Scheherazade (10%)
> 
> [1] https://twitter.com/liboDesign/status/926418319728660480

That is a rather small sample size, though. There are only 129 votes in that poll.
Comment 9 Yousuf Philips (jay) (retired) 2017-11-12 15:54:49 UTC
(In reply to Khaled Hosny from comment #8)
> That is a rather small sample size, though. There are only 129 votes in that
> poll.

The poll sample size would be small as the Arabic LO users base is small, and those who use open source fonts in their documents even smaller, and those who are on twitter and got notice of the 7-day poll would be even smaller.

The poll results dont determine the final decision, that will be taken by the RTL Arabic team, which of course you are part of, but it simply give us community input about it, like some suggesting Noto Arabic Naskh.
Comment 10 Yousuf Philips (jay) (retired) 2017-11-24 10:04:34 UTC
Created attachment 137957 [details]
mac OS X arabic fonts
Comment 11 Yousuf Philips (jay) (retired) 2017-11-24 12:16:28 UTC
Created attachment 137961 [details]
windows arabic fonts
Comment 12 Yousuf Philips (jay) (retired) 2017-11-24 12:37:33 UTC
Created attachment 137962 [details]
DecoType Naskh and Apple Arabic Default
Comment 13 Yousuf Philips (jay) (retired) 2017-11-24 23:50:39 UTC
Created attachment 137972 [details]
open source arabic fonts grouped based on look/style
Comment 14 Yousuf Philips (jay) (retired) 2017-11-25 00:01:02 UTC
So i'll be tackling the issue of what we should bundle in this comment.

Windows and Mac both provide a calligraphy-styled Naskh font (Arabic Typesetting, DecoType Naskh), a Kufi font (Andalus, KufiStandard GK), a variety of regular Naskh fonts, including a default arabic fallback font (Simplified Arabic/Times New Roman, Geeza Pro). Windows also includes monospace fonts (Courier New, Simplified Arabic Fixed) and sans fonts (Tahoma, Segoe UI).

So in order to help Windows and Mac users to use open source arabic fonts, as well as ensure interoperability of documents created on linux with the available open source arabic fonts, we should bundle

* calligraphy-styled Naskh - Amiri
* traditional-styled Naskh - KACSTOffice, KACSTBook, Scheherazade
* Kufi-style               - Reem Kufi
* mono-space fonts         - Ara­bic-Latin Modern Fixed, Thabit
* sans font                - Noto Sans Arabic

I've left out fonts from the Arabeyes collection and XB Niloofar based on Khaled's recommendation of their legal status. I also didnt include Noto/Droid Kufi and Noto/Droid Naskh in the list as we are already shipping them (bug 103080).
Comment 15 Khaled Hosny 2017-11-25 10:32:51 UTC
(In reply to Yousuf Philips (jay) from comment #12)
> Created attachment 137962 [details]
> DecoType Naskh and Apple Arabic Default

Apple Arabic fonts are AAT not OpenType fonts, so they don’t generally work outside Apple environments. The one that seem to work are just rendered using fallback shaping which is limited and requires the font to encode Arabic Presentation Forms-B compatibility characters.
Comment 16 Yousuf Philips (jay) (retired) 2017-12-19 12:09:02 UTC
Patch is in - https://gerrit.libreoffice.org/#/c/46624/

The archives can be found here

https://drive.google.com/open?id=1pvCiOthbbpjnPyuh9dyHubAkBSbXLaqa

I pulled the fonts from these sources and trimmed/reorganized some of the archives.

Amiri - https://github.com/alif-type/amiri/releases
KACST - https://packages.debian.org/stable/fonts-kacst
Scheherazade - https://software.sil.org/scheherazade/
Reem Kufi - https://github.com/alif-type/reem-kufi/releases
Thabit - https://packages.debian.org/stable/fonts-hosny-thabit
Comment 17 Khaled Hosny 2017-12-19 21:37:33 UTC
(In reply to Yousuf Philips (jay) from comment #16)
> Patch is in - https://gerrit.libreoffice.org/#/c/46624/
> 
> The archives can be found here
> 
> https://drive.google.com/open?id=1pvCiOthbbpjnPyuh9dyHubAkBSbXLaqa
> 
> I pulled the fonts from these sources and trimmed/reorganized some of the
> archives.
> 
> Amiri - https://github.com/alif-type/amiri/releases
> KACST - https://packages.debian.org/stable/fonts-kacst
> Scheherazade - https://software.sil.org/scheherazade/
> Reem Kufi - https://github.com/alif-type/reem-kufi/releases
> Thabit - https://packages.debian.org/stable/fonts-hosny-thabit

I don’t recommend including Thabit, it is an abandoned font.
Comment 18 Yousuf Philips (jay) (retired) 2017-12-20 16:39:19 UTC
(In reply to Khaled Hosny from comment #17)
> I don’t recommend including Thabit, it is an abandoned font.

Though it is no longer updated, it is available in the debian repo and would be used in arabic documents and is the only available substitute for courier new's monospace font, as liberation mono doesnt have arabic characters.
Comment 19 Khaled Hosny 2017-12-21 01:42:43 UTC
(In reply to Yousuf Philips (jay) from comment #18)
> (In reply to Khaled Hosny from comment #17)
> > I don’t recommend including Thabit, it is an abandoned font.
> 
> Though it is no longer updated, it is available in the debian repo and would
> be used in arabic documents and is the only available substitute for courier
> new's monospace font, as liberation mono doesnt have arabic characters.

By using an abandoned font with not much user base, we are on our own when bugs are found in the font (i.e. similar situation as we have now with the abandoned Linux Libertine G fonts).
Comment 20 Yousuf Philips (jay) (retired) 2017-12-21 15:17:26 UTC
(In reply to Khaled Hosny from comment #19)
> By using an abandoned font with not much user base, we are on our own when
> bugs are found in the font (i.e. similar situation as we have now with the
> abandoned Linux Libertine G fonts).

There is no way to know for certain how many users use Thabit, but Debian's popularity contest statistics does give us some info.

https://qa.debian.org/popcon.php?package=fonts-hosny-thabit

Bugs submitted to LO's bugzilla that are found in fonts are closed as NOTOURBUG, so i dont see that as a reason to not ship fonts that fill a void not filled by any other foss font, but anyway, i've removed it from the patch.
Comment 21 Eyal Rozenberg 2017-12-21 18:04:19 UTC
(In reply to Yousuf Philips (jay) from comment #20)
> but anyway, i've removed it from the patch.

I'd say don't remove it until there's an actual bug (is there?) - but it's not my call. Still, which monospace fonts are we left with other than Thaabet? Liberation Mono?
Comment 22 Yousuf Philips (jay) (retired) 2017-12-21 18:46:08 UTC
Created attachment 138577 [details]
arabic monospace fonts

(In reply to Eyal Rozenberg from comment #21)
> I'd say don't remove it until there's an actual bug (is there?) - but it's
> not my call.

Well Khaled was the maintainer of the Thabit font before he abandoned it, so he must know of particular issues in the font that wont be getting fixed.

> Still, which monospace fonts are we left with other than
> Thaabet? Liberation Mono?

Other than Thabit, there is ALM Fixed and Kawab. Speaking with others, Kawab is more useful to ALM Fixed, so if we had to include one that would the one to go with, but neither of them are a courier new substitute. Liberation Mono doesnt have arabic glyphs in it.

ALM Fixed - https://www.ctan.org/pkg/almfixed
Kawab - https://makkuk.com/kawkab-mono/
Comment 23 Commit Notification 2017-12-21 19:18:08 UTC
Yousuf Philips committed a patch related to this issue.
It has been pushed to "master":

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

tdf#113532 Add Arabic fonts into default installation

It will be available in 6.1.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 24 Yousuf Philips (jay) (retired) 2017-12-21 19:38:31 UTC
Created attachment 138580 [details]
default sans font selection

No that the bundled arabic fonts are finished, we can now look at what should be the default font used in writer for headings and body text, and what should be the default font used in calc, impress, and draw.

In the attachment, we have a selection of fonts that can be used as the default font for calc, impress and draw. I had chosen Noto Naskh Arabic previously but then Noto Sans Arabic was released in October and feel that is the better font, as it is a Sans font that looks similar to both our current default Tahoma and the fallback DejaVu Sans.
Comment 25 Yousuf Philips (jay) (retired) 2017-12-21 20:28:50 UTC
Created attachment 138582 [details]
various heading and text body combinations

In writer, we have to select which font to use for headings and which one for text body. In English and Hebrew, they default to a Sans font for headings and a serif font for text body, which does make it easier to identify. I'm thinking that going with Noto Naskh or Noto Kufi for headings and Amiri, KacstBook or KacstOffice for text body.
Comment 26 Commit Notification 2018-01-16 14:12:51 UTC
Yousuf Philips committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=26c4a36cad9aca8e07abcbfeddf744ae112a4bc0&h=libreoffice-6-0

tdf#113532 Add Arabic fonts into default installation

It will be available in 6.0.1.

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 27 Commit Notification 2018-01-19 21:57:09 UTC
Yousuf Philips committed a patch related to this issue.
It has been pushed to "libreoffice-6-0-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=539e2efa4e6ef82a1a5e9d58cd36a616c73546fc&h=libreoffice-6-0-0

tdf#113532 Add Arabic fonts into default installation

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 28 Eike Rathke 2018-02-15 17:56:37 UTC
I guess we can close this as resolved fixed now?
Comment 29 Yousuf Philips (jay) (retired) 2018-02-16 13:59:19 UTC
(In reply to Eike Rathke from comment #28)
> I guess we can close this as resolved fixed now?

The reordering of default fonts still is pending, see comment 24.