Skip to contentSkip to conversation

Documentation: Web fonts for kernel documentation

RFC PATCH In review Bagas Sanjaya 5 participants 16 messages Nov 2, 2023 – Nov 5, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Documentation: Web fonts for kernel documentation

Intro
=====

The Linux kernel documentation is primarily composed of text (both prose and code snippets) and a few images. Hence, making the text easy to read by proper typography choices is crucial.

The problem
===========

Currently, the kernel docs uses system-default serif fonts, as in Documentation/conf.py:

```
...
if  html_theme == 'alabaster':
    html_theme_options = {
        'description': get_cline_version(),
        'page_width': '65em',
        'sidebar_width': '15em',
        'fixed_sidebar': 'true',
        'font_size': 'inherit',
        'font_family': 'serif',
    }
...
```

The problem is depending on the serif font selected by system, the docs text (especially long passages) can be hard and uncomfortable to read. For developers reading the docs on multiple devices, the apparence may look inconsistent.

The solution
============

Uniform the font choices by leveraging web fonts. Most of people reading the kernel docs should already have modern browser that supports this feature (e.g. Chrome/Chromium and Firefox). The fonts are downloaded automatically when loading the page, but only if the reader don't already have ones installed locally. Subsequent docs page loading will use the browser cache to retrieve the fonts. If for some reasons the fonts fail to load, the browser will fall back to fallback fonts commonly seen on other sites.

For the font choices, we settle down on IBM Plex Sans (sans-serif), IBM Plex Mono (monospace), and Newsreader (serif). All these fonts are licensed under OFL 1.1 and can be distributed alongside the kernel docs. We have also considered to use Söhne [1] instead, but because it is paid font, it is concluded that such font is non-free [2] (and by implication, distributions must patch the kernel to not use it).

The fonts selected are downloaded from Google Fonts directory [3]. As the font files are in .ttf format, these are compressed first into .woff2 format (just like other sites that use web fonts do) using woff2_compress program from woff2 Debian package. These converted files are then referenced in Documentation/sphinx-static/fonts.css via @font-face directive and the appropriate font-family rule selects that font.

Note that only necessary styles (regular, bold, italic, and bold-italic) are included and used. For Newsreader, use the classic 14 pt static font instead of variable variant for compatibility with older browsers.

Scope
=====

Only the main documentation and translations in languages using Latin script (Italian and Spanish) are covered.

[1]: https://klim.co.nz/retail-fonts/soehne/
[2]: https://lists.debian.org/debian-legal/2023/06/msg00005.html
[3]: https://fonts.google.com

Bagas Sanjaya (4):
LICENSES: Add SIL Open Font License 1.1
Docmentation: Use IBM Plex Sans for page body
Documentation: Use Newsreader font for document headings
Documentation: Use IBM Plex Mono as monospace font

 Documentation/conf.py                         |   4 +
 .../sphinx-static/IBMPlexMono-Bold.woff2      | Bin 0 -> 39984 bytes
 .../IBMPlexMono-BoldItalic.woff2              | Bin 0 -> 43816 bytes
 .../sphinx-static/IBMPlexMono-Italic.woff2    | Bin 0 -> 43236 bytes
 .../sphinx-static/IBMPlexMono-Regular.woff2   | Bin 0 -> 38740 bytes
 .../sphinx-static/IBMPlexSans-Bold.woff2      | Bin 0 -> 55412 bytes
 .../IBMPlexSans-BoldItalic.woff2              | Bin 0 -> 59112 bytes
 .../sphinx-static/IBMPlexSans-Italic.woff2    | Bin 0 -> 59468 bytes
 .../sphinx-static/IBMPlexSans-Regular.woff2   | Bin 0 -> 55380 bytes
 .../sphinx-static/Newsreader_14pt-Bold.woff2  | Bin 0 -> 44512 bytes
 .../Newsreader_14pt-BoldItalic.woff2          | Bin 0 -> 48152 bytes
 .../Newsreader_14pt-Italic.woff2              | Bin 0 -> 44864 bytes
 .../Newsreader_14pt-Regular.woff2             | Bin 0 -> 41212 bytes
 Documentation/sphinx-static/fonts.css         | 157 ++++++++++++++++++
 LICENSES/dual/OFL-1.1                         | 107 ++++++++++++
 15 files changed, 268 insertions(+)
 create mode 100644 Documentation/sphinx-static/IBMPlexMono-Bold.woff2
 create mode 100644 Documentation/sphinx-static/IBMPlexMono-BoldItalic.woff2
 create mode 100644 Documentation/sphinx-static/IBMPlexMono-Italic.woff2
 create mode 100644 Documentation/sphinx-static/IBMPlexMono-Regular.woff2
 create mode 100644 Documentation/sphinx-static/IBMPlexSans-Bold.woff2
 create mode 100644 Documentation/sphinx-static/IBMPlexSans-BoldItalic.woff2
 create mode 100644 Documentation/sphinx-static/IBMPlexSans-Italic.woff2
 create mode 100644 Documentation/sphinx-static/IBMPlexSans-Regular.woff2
 create mode 100644 Documentation/sphinx-static/Newsreader_14pt-Bold.woff2
 create mode 100644 Documentation/sphinx-static/Newsreader_14pt-BoldItalic.woff2
 create mode 100644 Documentation/sphinx-static/Newsreader_14pt-Italic.woff2
 create mode 100644 Documentation/sphinx-static/Newsreader_14pt-Regular.woff2
 create mode 100644 Documentation/sphinx-static/fonts.css
 create mode 100644 LICENSES/dual/OFL-1.1

base-commit: babe393974de0351c0e6cca50f5f84edaf8d7fa1

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#1 lore raw

RFC PATCH 1/4 LICENSES: Add SIL Open Font License 1.1

Add the license text along with appropriate tags for reference and tooling. The text is taken from the text as distributed in Google Fonts's zip files.

As the license itself may or may note be compatible with GPLv2, let's take on the err side and require combining it with GPL-compatible licenses when using the license.

Cc Richard Fontana <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 LICENSES/dual/OFL-1.1 | 107 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 107 insertions(+)
 create mode 100644 LICENSES/dual/OFL-1.1
LICENSES/dual/OFL-1.1 new file +107 -0
new file mode 100644
index 00000000000000..00b8db08bd0e54
@@ -0,0 +1,107 @@
+Valid-License-Identifier: OFL-1.1
+SPDX-URL: https://spdx.org/licenses/OFL-1.1
+Usage-Guide:
+  Do NOT use this license for code, but it's acceptable for fonts (where the
+  license is specifically written for them). It's best to use it together
+  with a GPL2 compatible license using "OR", as OFL-1.1 texts processed by
+  the kernel's build system might combine it with content taken from more
+  restrictive licenses.
+  To use the SIL Open Font License 1.1, put the following SPDX tag/value pair
+  into a comment according to the placement guidelines in the licensing rules
+  documentation:
+    SPDX-License-Identifier: OFL-1.1
+License-Text:
+
+Copyright © <year> <owner>. with Reserved Font Name <reserved font name>.
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded, 
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
Signature · 1 line
An old man doll... just what I always wanted! - Clara
#2 lore raw

Re: [PATCH RFC 1/4] LICENSES: Add SIL Open Font License 1.1

Quoted 8 lines · Bagas Sanjaya

Add the license text along with appropriate tags for reference and tooling. The text is taken from the text as distributed in Google Fonts's zip files.

As the license itself may or may note be compatible with GPLv2, let's take on the err side and require combining it with GPL-compatible licenses when using the license.

Quoted 6 lines
Cc Richard Fontana <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 LICENSES/dual/OFL-1.1 | 107 ++++++++++++++++++++++++++++++++++++++++++

You add this license, but then never actually reference it in the later changes, so it's going to be very confusing as to why it is here. Any way to add it to the font files themselves so our checker tools can handle this properly?

And, it's not going to work as a dual-license, you can't just suddenly dual-license those font files, right?

Quoted 11 lines
 1 file changed, 107 insertions(+)
 create mode 100644 LICENSES/dual/OFL-1.1
LICENSES/dual/OFL-1.1 new file +2 -0
new file mode 100644
index 00000000000000..00b8db08bd0e54
@@ -0,0 +1,107 @@
+Valid-License-Identifier: OFL-1.1
+SPDX-URL: https://spdx.org/licenses/OFL-1.1

LICENSES/dual/OFL-1.1 line 12

Quoted 10 lines
LICENSES/dual/OFL-1.1 new file +10 -0
+Usage-Guide:
+  Do NOT use this license for code, but it's acceptable for fonts (where the
+  license is specifically written for them). It's best to use it together
+  with a GPL2 compatible license using "OR", as OFL-1.1 texts processed by
+  the kernel's build system might combine it with content taken from more
+  restrictive licenses.
+  To use the SIL Open Font License 1.1, put the following SPDX tag/value pair
+  into a comment according to the placement guidelines in the licensing rules
+  documentation:
+    SPDX-License-Identifier: OFL-1.1

Where did this Usage-Guide from?

thanks,

greg k-h

#3 lore raw

Re: [PATCH RFC 1/4] LICENSES: Add SIL Open Font License 1.1

Quoted 16 lines · Greg Kroah-Hartman
Quoted 8 lines · Bagas Sanjaya

Add the license text along with appropriate tags for reference and tooling. The text is taken from the text as distributed in Google Fonts's zip files.

As the license itself may or may note be compatible with GPLv2, let's take on the err side and require combining it with GPL-compatible licenses when using the license.

Quoted 6 lines
Cc Richard Fontana <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 LICENSES/dual/OFL-1.1 | 107 ++++++++++++++++++++++++++++++++++++++++++
Quoted 4 lines

You add this license, but then never actually reference it in the later changes, so it's going to be very confusing as to why it is here. Any way to add it to the font files themselves so our checker tools can handle this properly?

There is TTF name string ID called "License". For example, on IBM Plex Sans, the string value is:

```
This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: http://scripts.sil.org/OFL
```

Checking that string requires scripting fontforge, and since the string value may differ (but has the same license) across different fonts, scripting it can be non-trivial.

Quoted 3 lines

And, it's not going to work as a dual-license, you can't just suddenly dual-license those font files, right?

I was thinking of putting OFL in LICENSES/exceptions instead due to this nature.

Quoted 16 lines
Quoted 16 lines
 1 file changed, 107 insertions(+)
 create mode 100644 LICENSES/dual/OFL-1.1
LICENSES/dual/OFL-1.1 new file +6 -0
new file mode 100644
index 00000000000000..00b8db08bd0e54
@@ -0,0 +1,107 @@
+Valid-License-Identifier: OFL-1.1
+SPDX-URL: https://spdx.org/licenses/OFL-1.1
+Usage-Guide:
+  Do NOT use this license for code, but it's acceptable for fonts (where the
+  license is specifically written for them). It's best to use it together
+  with a GPL2 compatible license using "OR", as OFL-1.1 texts processed by
Quoted 8 lines

LICENSES/dual/OFL-1.1 line 12

Quoted 6 lines
LICENSES/dual/OFL-1.1 new file +6 -0
+  the kernel's build system might combine it with content taken from more
+  restrictive licenses.
+  To use the SIL Open Font License 1.1, put the following SPDX tag/value pair
+  into a comment according to the placement guidelines in the licensing rules
+  documentation:
+    SPDX-License-Identifier: OFL-1.1

Where did this Usage-Guide from?

Adapted from LICENSES/dual/CC-BY-4.0.

Thanks.

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#4 lore raw

Re: [PATCH RFC 1/4] LICENSES: Add SIL Open Font License 1.1

Quoted 25 lines · Bagas Sanjaya
Quoted 16 lines · Greg Kroah-Hartman
Quoted 8 lines · Bagas Sanjaya

Add the license text along with appropriate tags for reference and tooling. The text is taken from the text as distributed in Google Fonts's zip files.

As the license itself may or may note be compatible with GPLv2, let's take on the err side and require combining it with GPL-compatible licenses when using the license.

Quoted 6 lines
Cc Richard Fontana <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 LICENSES/dual/OFL-1.1 | 107 ++++++++++++++++++++++++++++++++++++++++++
Quoted 4 lines

You add this license, but then never actually reference it in the later changes, so it's going to be very confusing as to why it is here. Any way to add it to the font files themselves so our checker tools can handle this properly?

There is TTF name string ID called "License". For example, on IBM Plex Sans, the string value is:

Quoted 7 lines
```
This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: http://scripts.sil.org/OFL
```

Checking that string requires scripting fontforge, and since the string value may differ (but has the same license) across different fonts, scripting it can be non-trivial.

And is that in the files you added? They are binary so it's hard to determine this :(

Quoted 6 lines
Quoted 3 lines

And, it's not going to work as a dual-license, you can't just suddenly dual-license those font files, right?

I was thinking of putting OFL in LICENSES/exceptions instead due to this nature.

Yes, it can not be a dual one.

Quoted 24 lines
Quoted 15 lines
Quoted 15 lines
 1 file changed, 107 insertions(+)
 create mode 100644 LICENSES/dual/OFL-1.1
LICENSES/dual/OFL-1.1 new file +6 -0
new file mode 100644
index 00000000000000..00b8db08bd0e54
@@ -0,0 +1,107 @@
+Valid-License-Identifier: OFL-1.1
+SPDX-URL: https://spdx.org/licenses/OFL-1.1
+Usage-Guide:
+  Do NOT use this license for code, but it's acceptable for fonts (where the
+  license is specifically written for them). It's best to use it together
+  with a GPL2 compatible license using "OR", as OFL-1.1 texts processed by
Quoted 8 lines

LICENSES/dual/OFL-1.1 line 12

Quoted 6 lines
LICENSES/dual/OFL-1.1 new file +6 -0
+  the kernel's build system might combine it with content taken from more
+  restrictive licenses.
+  To use the SIL Open Font License 1.1, put the following SPDX tag/value pair
+  into a comment according to the placement guidelines in the licensing rules
+  documentation:
+    SPDX-License-Identifier: OFL-1.1

Where did this Usage-Guide from?

Quoted 1 line

Adapted from LICENSES/dual/CC-BY-4.0.

Which it shouldn't be :(

Anyway, this is independent of the issue if we actually should take these fonts into the kernel tree, and mandate their use (my opinion is no, that's not for us to use, and especially for any action that might cause a web browser to look elsewhere outside of our documentation.)

Also, for documentation, I'm pretty sure that serif fonts is proven to be "nicer" overall by many studies.

thanks,

greg k-h

#5 lore raw

Re: [PATCH RFC 1/4] LICENSES: Add SIL Open Font License 1.1

Quoted 17 lines · Greg Kroah-Hartman
Quoted 16 lines · Bagas Sanjaya
Quoted 7 lines · Greg Kroah-Hartman
Quoted 1 line · Bagas Sanjaya
 LICENSES/dual/OFL-1.1 | 107 ++++++++++++++++++++++++++++++++++++++++++

You add this license, but then never actually reference it in the later changes, so it's going to be very confusing as to why it is here. Any way to add it to the font files themselves so our checker tools can handle this properly?

There is TTF name string ID called "License". For example, on IBM Plex Sans, the string value is:

```
This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: http://scripts.sil.org/OFL
```
Quoted 6 lines
Quoted 3 lines

Checking that string requires scripting fontforge, and since the string value may differ (but has the same license) across different fonts, scripting it can be non-trivial.

And is that in the files you added? They are binary so it's hard to determine this :(

Yes.

Quoted 9 lines
Quoted 7 lines
Quoted 4 lines

And, it's not going to work as a dual-license, you can't just suddenly dual-license those font files, right?

I was thinking of putting OFL in LICENSES/exceptions instead due to this nature.

Yes, it can not be a dual one.

That's right!

What about just saying below in the CSS file that includes the fonts?

```
...
/* Some cool fonts are licensed under OFL 1.1, see
 * LICENSES/exceptions/OFL-1.1 for more information. */
...
```
Quoted 17 lines
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
LICENSES/dual/OFL-1.1 new file +10 -0
+Usage-Guide:
+  Do NOT use this license for code, but it's acceptable for fonts (where the
+  license is specifically written for them). It's best to use it together
+  with a GPL2 compatible license using "OR", as OFL-1.1 texts processed by
+  the kernel's build system might combine it with content taken from more
+  restrictive licenses.
+  To use the SIL Open Font License 1.1, put the following SPDX tag/value pair
+  into a comment according to the placement guidelines in the licensing rules
+  documentation:
+    SPDX-License-Identifier: OFL-1.1
Quoted 3 lines
Quoted 1 line

Where did this Usage-Guide from?

Adapted from LICENSES/dual/CC-BY-4.0.

Which it shouldn't be :(

Quoted 7 lines

Anyway, this is independent of the issue if we actually should take these fonts into the kernel tree, and mandate their use (my opinion is no, that's not for us to use, and especially for any action that might cause a web browser to look elsewhere outside of our documentation.)

Also, for documentation, I'm pretty sure that serif fonts is proven to be "nicer" overall by many studies.

Any pointer to them? Or do serif fonts more readable and not causing eye strain?

Thanks.

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#6 lore raw

Re: [PATCH RFC 1/4] LICENSES: Add SIL Open Font License 1.1

Quoted 39 lines · Bagas Sanjaya
Quoted 17 lines · Greg Kroah-Hartman
Quoted 16 lines · Bagas Sanjaya
Quoted 7 lines · Greg Kroah-Hartman
Quoted 1 line · Bagas Sanjaya
 LICENSES/dual/OFL-1.1 | 107 ++++++++++++++++++++++++++++++++++++++++++

You add this license, but then never actually reference it in the later changes, so it's going to be very confusing as to why it is here. Any way to add it to the font files themselves so our checker tools can handle this properly?

There is TTF name string ID called "License". For example, on IBM Plex Sans, the string value is:

```
This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: http://scripts.sil.org/OFL
```
Quoted 6 lines
Quoted 3 lines

Checking that string requires scripting fontforge, and since the string value may differ (but has the same license) across different fonts, scripting it can be non-trivial.

And is that in the files you added? They are binary so it's hard to determine this :(

Yes.

Quoted 9 lines
Quoted 7 lines
Quoted 4 lines

And, it's not going to work as a dual-license, you can't just suddenly dual-license those font files, right?

I was thinking of putting OFL in LICENSES/exceptions instead due to this nature.

Yes, it can not be a dual one.

That's right!

Quoted 8 lines

What about just saying below in the CSS file that includes the fonts?

```
...
/* Some cool fonts are licensed under OFL 1.1, see
 * LICENSES/exceptions/OFL-1.1 for more information. */
...
```

That's not in SPDX format :)

Anyway, I think the meta-comment so far is "do we want to include fonts in the kernel source", right? For that, I would argue "no, let's not deal with that mess for now".

thanks,

greg k-h

#7 lore raw

Re: [PATCH RFC 1/4] LICENSES: Add SIL Open Font License 1.1

Quoted 42 lines · Greg Kroah-Hartman
Quoted 41 lines · Bagas Sanjaya
Quoted 17 lines · Greg Kroah-Hartman
Quoted 16 lines · Bagas Sanjaya
Quoted 7 lines · Greg Kroah-Hartman
Quoted 1 line · Bagas Sanjaya
 LICENSES/dual/OFL-1.1 | 107 ++++++++++++++++++++++++++++++++++++++++++

You add this license, but then never actually reference it in the later changes, so it's going to be very confusing as to why it is here. Any way to add it to the font files themselves so our checker tools can handle this properly?

There is TTF name string ID called "License". For example, on IBM Plex Sans, the string value is:

```
This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: http://scripts.sil.org/OFL
```
Quoted 6 lines
Quoted 3 lines

Checking that string requires scripting fontforge, and since the string value may differ (but has the same license) across different fonts, scripting it can be non-trivial.

And is that in the files you added? They are binary so it's hard to determine this :(

Yes.

Quoted 9 lines
Quoted 7 lines
Quoted 4 lines

And, it's not going to work as a dual-license, you can't just suddenly dual-license those font files, right?

I was thinking of putting OFL in LICENSES/exceptions instead due to this nature.

Yes, it can not be a dual one.

That's right!

What about just saying below in the CSS file that includes the fonts?

Quoted 8 lines
Quoted 6 lines
```
...
/* Some cool fonts are licensed under OFL 1.1, see
 * LICENSES/exceptions/OFL-1.1 for more information. */
...
```

That's not in SPDX format :)

Yes, without it (CSS files of course should already have SPDX line); but I highlight importing webfonts above, where due to binary nature of font files, we have to resort to simple license notice above (pre-SPDX) whenever about to use them.

Quoted 5 lines

Anyway, I think the meta-comment so far is "do we want to include fonts in the kernel source", right? For that, I would argue "no, let's not deal with that mess for now".

So far I'm only concerned about including OFL fonts. In the cover letter, I also considered non-free, paid fonts (like Söhne), which IMO looks better than IBM Plex. Of course, if someone submits a version of this series but with Söhne instead (hey because many other sites do use that font), Greg will instantly reject it, right?

Thanks.

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#8 lore raw

Re: [PATCH RFC 1/4] LICENSES: Add SIL Open Font License 1.1

In reply to Bagas Sanjaya
Quoted 8 lines · Bagas Sanjaya

Add the license text along with appropriate tags for reference and tooling. The text is taken from the text as distributed in Google Fonts's zip files.

As the license itself may or may note be compatible with GPLv2, let's take on the err side and require combining it with GPL-compatible licenses when using the license.

I don't really understand this, though maybe it doesn't practically matter - "It's best to use it together

+  with a GPL2 compatible license using "OR", as OFL-1.1 texts processed by
+  the kernel's build system might combine it with content taken from more
+  restrictive licenses."

I didn't check if this text is just copied from that in other license files.

I'm not sure how this would actually come up in practice for OFL-1.1. I assume that typically the way OFL-1.1 can cover stuff in the kernel is through font files, and that therefore it would be unlikely for a source file to include any code covered by OFL-1.1. Indeed, as you say:

LICENSES/dual/OFL-1.1 line 5

Quoted 2 lines
LICENSES/dual/OFL-1.1 new file +2 -0
+  Do NOT use this license for code, but it's acceptable for fonts (where the
+  license is specifically written for them). It's best to use it together

Even if that did occur, the use of OR is only appropriate if the stuff covered by OFL-1.1 is actually dual-licensed.

I think it should be beyond dispute that OFL-1.1 is incompatible with the GPL (over at the Fedora project we don't even classify it as a FOSS license), not that that is likely to matter for the kernel.

Richard

#9 lore raw

Re: [PATCH RFC 1/4] LICENSES: Add SIL Open Font License 1.1

Quoted 16 lines · Richard Fontana
Quoted 8 lines · Bagas Sanjaya

Add the license text along with appropriate tags for reference and tooling. The text is taken from the text as distributed in Google Fonts's zip files.

As the license itself may or may note be compatible with GPLv2, let's take on the err side and require combining it with GPL-compatible licenses when using the license.

I don't really understand this, though maybe it doesn't practically matter - "It's best to use it together

LICENSES/dual/OFL-1.1 new file +3 -0
+  with a GPL2 compatible license using "OR", as OFL-1.1 texts processed by
+  the kernel's build system might combine it with content taken from more
+  restrictive licenses."
Quoted 1 line

I didn't check if this text is just copied from that in other license files.

Yes, indeed I adapted it from LICENSES/dual/CC-BY-4.0.

Quoted 7 lines

I'm not sure how this would actually come up in practice for OFL-1.1. I assume that typically the way OFL-1.1 can cover stuff in the kernel is through font files, and that therefore it would be unlikely for a source file to include any code covered by OFL-1.1. Indeed, as you say:

Quoted 6 lines

LICENSES/dual/OFL-1.1 line 5

Quoted 2 lines
LICENSES/dual/OFL-1.1 new file +2 -0
+  Do NOT use this license for code, but it's acceptable for fonts (where the
+  license is specifically written for them). It's best to use it together

Even if that did occur, the use of OR is only appropriate if the stuff covered by OFL-1.1 is actually dual-licensed.

Another alternative is to put license notice on CSS code that includes the font. In this case, in Documentation/sphinx-static/fonts.css, the top of the file should've been written as:

```
/* SPDX-License-Identifier: GPL-2.0 */
/* IBM Plex Sans, IBM Plex Mono, and Newsreader is licensed under the SIL Open
 * Font License, version 1.1. See OFL.txt in the same directory as this file
 * for details. */
<actual stylesheet>
...
```

Is above acceptable?

Thanks.

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#10 lore raw

RFC PATCH 2/4 Docmentation: Use IBM Plex Sans for page body

In reply to Bagas Sanjaya

Adapted from "About the font" page on Google Fonts [1]:

```
Plex is an international typeface family developed by IBM, aimed to
illustrate unique relationship between mankind and machine. The font
is neutral, yet friendly Grosteque-style typeface that balances
design with the engineered details. The font has excellent legibility
in print, web, and mobile interfaces.
```

Use IBM Plex Sans font for both documentation content (excluding title and section headings) and sidebar.

[1]: https://fonts.google.com/specimen/IBM+Plex+Sans/about

---
 Documentation/conf.py                         |   4 ++
 .../sphinx-static/IBMPlexSans-Bold.woff2      | Bin 0 -> 55412 bytes
 .../IBMPlexSans-BoldItalic.woff2              | Bin 0 -> 59112 bytes
 .../sphinx-static/IBMPlexSans-Italic.woff2    | Bin 0 -> 59468 bytes
 .../sphinx-static/IBMPlexSans-Regular.woff2   | Bin 0 -> 55380 bytes
 Documentation/sphinx-static/fonts.css         |  68 ++++++++++++++++++
 6 files changed, 72 insertions(+)
 create mode 100644 Documentation/sphinx-static/IBMPlexSans-Bold.woff2
 create mode 100644 Documentation/sphinx-static/IBMPlexSans-BoldItalic.woff2
 create mode 100644 Documentation/sphinx-static/IBMPlexSans-Italic.woff2
 create mode 100644 Documentation/sphinx-static/IBMPlexSans-Regular.woff2
 create mode 100644 Documentation/sphinx-static/fonts.css
Documentation/conf.py +4 -0
index d4fdf6a3875a83..51f48a57eb706c 100644
@@ -337,6 +337,10 @@ if  html_theme == 'alabaster':
         'font_family': 'serif',
     }
 
+    html_css_files = [
+            'fonts.css',
+    ]
+
 sys.stderr.write("Using %s theme\n" % html_theme)
 
 # Add any paths that contain custom static files (such as style sheets) here,
Documentation/sphinx-static/IBMPlexSans-Bold.woff2 new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..aee2f963e123b76ef8fda0f8b71f7f8e73b296be
GIT binary patch
Documentation/sphinx-static/IBMPlexSans-BoldItalic.woff2 new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..af079f2979a71d2736457c47a6d5d12a6cd7ca63
GIT binary patch
Documentation/sphinx-static/IBMPlexSans-Italic.woff2 new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..57523c9d34353ceaa6cd4cb7820f83ac570d836c
GIT binary patch
Documentation/sphinx-static/IBMPlexSans-Regular.woff2 new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..ca64cc5fc21568752a2e5d78af1f14754b49e72e
GIT binary patch
Documentation/sphinx-static/fonts.css new file +68 -0

68 lines not on this page · raw message

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#11 lore raw

RFC PATCH 3/4 Documentation: Use Newsreader font for document headings

In reply to Bagas Sanjaya

From "About the font" page on Google Fonts:

```
NewsReader is an original typeface designed by Production Type, primarily
intended for continuous on-screen reading in content-rich environments.
```

Use Newsreader for title and section headings.

[1]: https://fonts.google.com/specimen/Newsreader/about

---
It seems like Source Serif 4 [1] or IBM Plex Serif [2] are better candidates, as when I read the generated docs output, I'm more focused on the headings than on the text body. Still, differentiating heading and body text fonts are done in order to give better contrast and distinction, considering the lengthy nature of the docs.

[1]: https://fonts.google.com/specimen/Source+Serif+4
[2]: https://fonts.google.com/specimen/IBM+Plex+Serif

 .../sphinx-static/Newsreader_14pt-Bold.woff2  | Bin 0 -> 44512 bytes
 .../Newsreader_14pt-BoldItalic.woff2          | Bin 0 -> 48152 bytes
 .../Newsreader_14pt-Italic.woff2              | Bin 0 -> 44864 bytes
 .../Newsreader_14pt-Regular.woff2             | Bin 0 -> 41212 bytes
 Documentation/sphinx-static/fonts.css         |  44 ++++++++++++++++++
 5 files changed, 44 insertions(+)
 create mode 100644 Documentation/sphinx-static/Newsreader_14pt-Bold.woff2
 create mode 100644 Documentation/sphinx-static/Newsreader_14pt-BoldItalic.woff2
 create mode 100644 Documentation/sphinx-static/Newsreader_14pt-Italic.woff2
 create mode 100644 Documentation/sphinx-static/Newsreader_14pt-Regular.woff2
Documentation/sphinx-static/Newsreader_14pt-Bold.woff2 new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..bbe393623c78a19ec7586f72136762fc76cab741
GIT binary patch
Documentation/sphinx-static/Newsreader_14pt-BoldItalic.woff2 new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..3b79f20425102e062831f96fdf5a58ad71f2255d
GIT binary patch
Documentation/sphinx-static/Newsreader_14pt-Italic.woff2 new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..70fcb0b416881ec723db43c29e16d498873a46df
GIT binary patch
Documentation/sphinx-static/Newsreader_14pt-Regular.woff2 new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..4c572e9c3376bcb64cf515e7275be6d07a2b71fe
GIT binary patch
Documentation/sphinx-static/fonts.css +44 -0

59 lines not on this page · raw message

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#12 lore raw

RFC PATCH 4/4 Documentation: Use IBM Plex Mono as monospace font

In reply to Bagas Sanjaya

Adapted from "About the font" page on Google Fonts [1]:

```
Plex is an international typeface family developed by IBM, aimed to
illustrate unique relationship between mankind and machine. The font
is neutral, yet friendly Grosteque-style typeface that balances
design with the engineered details. The font has excellent legibility
in print, web, and mobile interfaces.
```

Use IBM Plex Mono to format monospace texts (e.g. code samples, inline code, and keyboard sequences).

[1]: https://fonts.google.com/specimen/IBM+Plex+Mono/about

---
 .../sphinx-static/IBMPlexMono-Bold.woff2      | Bin 0 -> 39984 bytes
 .../IBMPlexMono-BoldItalic.woff2              | Bin 0 -> 43816 bytes
 .../sphinx-static/IBMPlexMono-Italic.woff2    | Bin 0 -> 43236 bytes
 .../sphinx-static/IBMPlexMono-Regular.woff2   | Bin 0 -> 38740 bytes
 Documentation/sphinx-static/fonts.css         |  45 ++++++++++++++++++
 5 files changed, 45 insertions(+)
 create mode 100644 Documentation/sphinx-static/IBMPlexMono-Bold.woff2
 create mode 100644 Documentation/sphinx-static/IBMPlexMono-BoldItalic.woff2
 create mode 100644 Documentation/sphinx-static/IBMPlexMono-Italic.woff2
 create mode 100644 Documentation/sphinx-static/IBMPlexMono-Regular.woff2
Documentation/sphinx-static/IBMPlexMono-Bold.woff2 new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..3cb3a718d4968b0b3ee5c93c8ecf109701ecca84
GIT binary patch
Documentation/sphinx-static/IBMPlexMono-BoldItalic.woff2 new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..feb7a60b0776cb0d3a0d68d147856b86a24f9be4
GIT binary patch
Documentation/sphinx-static/IBMPlexMono-Italic.woff2 new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..70509605b3d78c029ce4bbdfe28aff907bd469ff
GIT binary patch
Documentation/sphinx-static/IBMPlexMono-Regular.woff2 new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..c10f7a5c4df06b41f9e8b6219a5ca60390b2b8be
GIT binary patch
Documentation/sphinx-static/fonts.css +45 -0

60 lines not on this page · raw message

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#13 lore raw
In reply to Bagas Sanjaya
Quoted 3 lines · Bagas Sanjaya

Intro
=====

Oops, linux-doc mailing list address was mistyped. Will resend (as v2) shortly.

Sorry for inconvenience.

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#14 lore raw
In reply to Bagas Sanjaya
Quoted 7 lines · Bagas Sanjaya

For the font choices, we settle down on IBM Plex Sans (sans-serif), IBM Plex Mono (monospace), and Newsreader (serif). All these fonts are licensed under OFL 1.1 and can be distributed alongside the kernel docs. We have also considered to use Söhne [1] instead, but because it is paid font, it is concluded that such font is non-free [2] (and by implication, distributions must patch the kernel to not use it).

If we are going to do something like this, then it could be nice to consider the ones that rustdoc picked, i.e. Fira Sans for headers, Source Serif 4 for text and Source Code Pro for code.

Cheers,
Miguel

#15 lore raw
In reply to Bagas Sanjaya
Quoted 6 lines · Bagas Sanjaya

Intro
=====

The Linux kernel documentation is primarily composed of text (both prose and code snippets) and a few images. Hence, making the text easy to read by proper typography choices is crucial.

No, it's not. Not to the point where we need to ship a font with the kernel tree for sure.