W3C Member Submission

Current Status of Japanese Typography Using Web Technologies

W3C Member Submission 02 January 2017

This version:
https://www.w3.org/submissions/2017/SUBM-CSJTUWT-20170102/
Latest version:
https://www.w3.org/submissions/CSJTUWT/
Authors:
Tatsuo Kobayashi 小林龍生 (Scholex)
Shinyu Murakami 村上真雄 (Vivliostyle)
Makoto Murata 村田真 (Vivliostyle/JEPA/International Univ of Japan)
Shin Niina 新名新 (Digital Publishing Initiatives Japan Co., Ltd.)
Florian Rivoal (Vivliostyle)
Junichi Yoshii 吉井順一 (Kodansha)

Abstract

In this document, we study whether or not CSS and HTML are sufficient for the layout of paginated documents in Japan. Specifically, we study requirements in two documents: W3C JLREQ and EPUB3 Petition of Japanese typesetting from EBPAJ. We show which requirement is covered by which CSS specification and supported by major browsers. We conclude that CSS as of now is quite good for Japanese paginated documents and that it will become even better if a few more modules (most notably Paged Media) are fully developed and implemented.

Status of this document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications can be found in the W3C technical reports index at https://www.w3.org/TR/.

By publishing this document, W3C acknowledges that the Submitting Members have made a formal Submission request to W3C for discussion. Publication of this document by W3C indicates no endorsement of its content by W3C, nor that W3C has, is, or will be allocating any resources to the issues addressed by it. This document is not the product of a chartered W3C group, but is published as potential input to the W3C Process. A W3C Team Comment has been published in conjunction with this Member Submission. Publication of acknowledged Member Submissions at the W3C site is one of the benefits of W3C Membership. Please consult the requirements associated with Member Submissions of section 3.3 of the W3C Patent Policy. Please consult the complete list of acknowledged W3C Member Submissions.


1. Introduction

Contents published as web pages or e-books are often published as printed documents as well. As of this writing, printed documents are typically created by desktop publishing software. Meanwhile, web pages are HTML documents accompanied by CSS stylesheets. E-books are typically EPUB publications, which are packages of HTML documents, CSS stylesheets, and so forth.

Therefore, authors are forced to create and maintain the same information in two representations: (1) HTML documents accompanied by CSS stylesheets, and (2) documents for desktop publishing software. Creation and maintenance of two different representations lead to significant costs and delay of publications.

We believe that the use of HTML and CSS for printed documents will reduce costs significantly and accelerate timely publication. However, it is commonly believed that HTML and CSS are insufficient for printed documents in the Japanese language, although it has not been made clear which feature is missing.

This document is an attempt to make clear what is already available and what is still missing in CSS and browser engines for publishing Japanese printed documents. Specifically, we study requirements in two documents: W3C JLREQ and EPUB3 Petition of Japanese typesetting from EBPAJ (The Electronic Book Publishers Association of Japan). We show which requirement is covered by which CSS specification and supported by major browsers.

There are some caveats on the scope of this study:

Magazines or technical manuals
This study is focused on common books. It does not cover other types of printed documents such as magazines or technical manuals. This is because there are no requirement documents for such printed documents. However, many features covered in this study are applicable to such printed documents.
Documents viewed on screen
Although we have used the term “printed documents”, this study is notlimited to documents printed on paper. It is applicable to paginated documents viewed on screen. In fact, one of the two requirement documents we study is dedicated to EPUB3 publications. We believe that paginated documents on screen play important roles especially when their layout is adapted automatically on different page or screen sizes.

Some W3C documents or wiki pages are relevant to this study, and they are listed in the bibliography of this document. Among them, International text layout and typography index from the W3C I18N WG is most relevant. But this study is focused on Japanese documents, and is directly based on two requirement documents.

We are aware that our study is still rudimentary. We plan to submit revised versions of this documents in the future. Feedbacks from the public are very welcome.

2. Analysis of Requirements in JLREQ

Requirements for Japanese Text Layout (JLREQ for short) is the flagship document describing requirements for Japanese text layout and typography support on the Web and in digital publications.

JLREQ is very systematic and provides a good coverage of features in Japanese typography. The main target of JLREQ is common books, but features listed in JLREQ can be used for magazines, technical manuals, and so forth. JLREQ does not provide priorities of features.

A separate companion document shows which feature in JLREQ is covered by which CSS specification. We consider each subclause in JLREQ as a single feature except when the subclause does not describe any specific features. We are aware that some subclauses actually describe multiple features. We plan to introduce finer classification of features in future versions of this document.

The meaning of the CSS status column is as follows:

More than a half of the listed features are covered by reasonably mature CSS specifications (i.e., 2 or 3). But some text layout features require CSS Ruby, CSS Text 3, CSS Text 4, and CSS Line Grid, which are not mature yet. Likewise, some pagination features require CSS Paged Media, CSS Page Floats, CSS Multi-column level 2, and CSS Generated Content for Paged Media, which are not mature either.

The separate companion document further shows which feature is implemented by major browsers. The meaning of the browser status column is as follows:

When some features are not covered by mature CSS specifications, browsers are not mature (as expected). But even for features already covered by mature specifications, browser implementations are sometimes not mature yet. We believe that browsers will soon catch up with latest CSS specifications and will become maturer in the near future.

Note

Some features are dedicated to paged media. These features may be outside the scope of browsers, but our analysis does not exclude them. Implementations that support pagination, such as EPUB readers or PDF formatters, do need to support such features.

3. Analysis of Requirements in EPUB3 Petition of Japanese Typesetting

EPUB3 Petition of Japanese Typesetting was prepared by The Electronic Book Publishers Association of Japan (EBPAJ). The EPUB viewer verification team of EBPAJ studied EPUB3 and reading systems in 2012, and found that some features around Japanese typography are not satisfactory at that time. Then, EBPAJ conducted a questionnaire survey to Japanese publishers, and provided priorities of these features.

Unlike JLREQ, this petition is focused on those features which were deemed important by ebook publishers in Japan. We further focus on page layout features and text layout features.

A separate companion document shows which feature in EPUB3 Petition is covered by which CSS specification, and further shows which feature is implemented by major browsers. The meaning of the CSS status column and that of the browser status column are as in the JLREQ analysis. Furthermore, the companion document shows publisher needs. The meaning of the publisher needs column is as follows:

Most of the listed features are covered by reasonably mature CSS specifications (i.e., 2 or 3). But some text layout features require CSS Ruby, CSS Text 3, CSS Text 4, and CSS Line Grid, which are not mature yet. Likewise, some page layout features require CSS Paged Media, CSS Page Floats, CSS Multi-column level 2, and Generated Content for Paged Media, which are not mature either.

Browser implementations of CSS Writing Modes, CSS Fragmentation, and CSS Multi-column 1 are not mature yet, although these CSS specifications are reasonably mature.

4. Request for Further Developments

On the basis of our analysis in section 2 and 3, we believe that some CSS modules need further development. Some of the WDs shown below are technically mature, but they need to become CRs at least.

The modules we have marked in bold are those where we believe have a well defined scope, a stable feature feature set, and are somewhat mature, even though they are not yet complete. We hope that increased participation will help raise their priority and help complete them, their test suites, and the corresponding implementations relatively quickly. The other modules are generally at earlier stages.

4.1 Text Layout Related CSS Modules

4.2 Page Layout Related CSS Modules

4.3 EPUB Adaptive Layout

EPUB Adaptive Layout http://www.idpf.org/epub/pgt/ is an informative document published by IDPF. It describes some interesting extensions of CSS.

EPUB Adaptive Layout assumes a processing model that is at odds with the way generic CSS implementations work, and as such is unlikely to progress as is. However, the features it offers make it possible to address a number of interesting use cases. Various proposals overlap with what it proposes, and progress on these topics, or on related alternatives would be very helpful in filling the remaining gaps:

4.4 Houdini

Some of the features we believe to be necessary for high quality typography and book publishing, and that we have highlighted in this document may become possible to implement by end users through the APIs developped by the Houdini project (https://github.com/w3c/css-houdini-drafts/wiki). In this document, we take no strong position on whether such features should be offered as a core part of CSS, or whether implementation via Houdini may prove sufficient if possible. We do hope that the Houdini task force will take these requirements into account while developing their APIs.

Appendix: CSS Secrets

The Japanese translation of CSS Secrets by Lea Verou was published as a printed book in 2016. Just like the original version, this book is prepared in HTML and CSS. We used the original HTML structure and CSS stylesheets as a basis, but augmented the CSS stylesheets for Japanese typography.

Many aspects of this book would not have been possible without using CSS features that are either non-standard or immature proposals early on the standards track yet are supported by our tool, as well as extensive pre-processing to inject presentational workarounds in the markup.

As the book is typeset using a combination of more than 5000 lines of CSS, 1000 lines of ruby (a programming language), and 4000 lines of XSLT, going into the full details of how it was done would be impractical. However, we provide here a brief overview of the areas where standard CSS as implemented by browsers was lacking. Where relevant, we also provide links to various specifications that attempt to address some of these issues, either explicitly or through generic mechanisms. Note that these specifications are of varying degrees of maturity and implementation, that there is overlap between some, and that in some cases none are insufficient to solve the problem. We nevertheless hope to highlight some areas of interest via this list.

Bibliography

JLREQ, W3C Working Group Note 3 April 2012,https://www.w3.org/TR/2012/NOTE-jlreq-20120403/

Companion Document: Analysis of Requirements in JLREQ, ./jlreq-analysis.html

Companion Document: Analysis of Requirements in EPUB3 Petition of Japanese Typesetting, ./epub-req-analysis.html

EPUB3 Petition of Japanese Typesetting, EBPAJ, 2015 http://ebpaj.jp/counsel/youbou

CSS Secrets by Lea Verou. O'Reilly Media, 2015. ISBN: 1449372635. (Japanese Translation, 2016)

Sample of CSS Secrets (in Japanese), 2016, http://vivliostyle.com/ja/samples/#css-secrets

Can you typeset a book with CSS? by Bert Bos, https://www.w3.org/Talks/2013/0604-CSS-Tokyo/

List-W3C-specs-important-to-dpub, https://www.w3.org/wiki/List-W3C-specs-important-to-dpub

DPUB Pagination Requirements, https://www.w3.org/dpub/IG/wiki/Pagination_Requirements

PWP Use Cases and Requirement - Pagination, https://www.w3.org/TR/pwp-ucr/#pagination

Requirements for Latin Text Layout and Pagination, https://www.w3.org/TR/dpub-latinreq/

International text layout and typography index, W3C Editor's Draft 01 December 2016, http://w3c.github.io/typography/