Looking Back at the Requirements for Chinese Text Layout

This is a machine-translated version of an article originally published in Chinese. Read the Chinese original.
Looking Back at the Requirements for Chinese Text Layout

On 18 and 19 September this year, the World Wide Web Consortium (W3C) held a digital publishing workshop at Keio University in Tokyo. Afterwards, the Advanced Publishing Laboratory (APL)—set up by several major Japanese publishers in partnership with Keio University—took the opportunity to hold a symposium, at which Bobby Tung, a participant in W3C’s Chinese standards work, gave a talk in Japanese on “The history of the Requirements for Chinese Text Layout and standardisation activities.” This article expands on that talk, describing where the Requirements for Chinese Text Layout stand today and what is needed to push it further.

The past and progress of the Requirements for Chinese Text Layout

In 2009, the Requirements for Japanese Text Layout (“日本語組版処理の要件”, JLREQ for short) was formally published. As the Japanese standardisation expert Tatsuo Kobayashi recounts in his book EPUB Senki (EPUB War Chronicle), it caused hardly a ripple in Japan itself. But it was the first language layout document published by the W3C Internationalization Working Group (i18n WG), and in fact an important opening move. On the one hand, as a reference document it drove the development of most of the CSS3 standards related to East Asian layout; on the other, it prompted other languages to follow, Chinese among them.


jp_w3c_00
日文排版需求的 GitHub 页面
日文排版需求的 GitHub 页面

Looking back to around 2010, HTML5 was the hot topic in tech circles (though it only became a Recommendation in 2014). Robin Berjon, then on the W3C staff, set up three interest groups—HTML5 Chinese, Korean and Japanese—to encourage discussion and feedback from the East Asian language communities, each discussing in its own language to lower the language barrier. In Taiwan it took off mainly because the theme of COSCUP, Taiwan’s largest open-source gathering, that year was precisely HTML5; it brought in many relevant experts and suddenly drew lots of people into the discussion. I remember the front-end expert John Hex, Zibin of Opera, Ping Ye (pingoo) of Google Taiwan and others, as well as a veteran of Taiwanese publishing, Chen Yingqing, known as “Lao Mao” (Old Cat).

Back then, beyond technical questions, the most heated discussion was about the many requirements of Chinese layout, including vertical writing, line-start prohibition, punctuation, and the spacing between Chinese characters and Western letters, which remains unresolved to this day.

A year later, Ping Ye put forward a proposal to pool the crowd’s efforts and write a Requirements for Chinese Text Layout (CLREQ) document modelled on JLREQ. To avoid reinventing the wheel, he suggested starting by translating JLREQ and then listing the differences from Japanese layout. Neither the discussions nor the proposal came to fruition at the time, but they left valuable records for later reference.

早年 W3C 社区中对中文排版需求的讨论
早年 W3C 社区中对中文排版需求的讨论
当年对「日文排版需求」的翻译半途而废
当年对「日文排版需求」的翻译半途而废
当年对「日文排版需求」的翻译半途而废
当年对「日文排版需求」的翻译半途而废

At the time I was a reporter and editor at a Taiwanese tech publication, interested mainly in operating systems and Web technology—at most a reasonably informed bystander in that world. In 2010, seeing the launch of the iPad, I threw myself into digital media, but I was still using software packages to produce digital content, so I remained at some distance.

Then in 2012, at the invitation of Masaaki Hagino, president of the veteran Japanese digital publisher Voyager Japan , I went to the Tokyo International Book Fair (held that year together with the Digital Publishing Expo; neither is held any more). With the Japanese government pushing standardisation, Japan had decided to adopt EPUB3 as its common ebook format, and seeing the Japanese public and private sectors working closely together to take EPUB3 from standard to application, I felt that the digital publishing wave had finally travelled east from America to Asia. I left journalism, founded a small company and decided to enter the industry. I never imagined how far that decision would shape my life; as they say in Taiwan, having fallen into a big hole, I now want to fill it in.

A few years earlier, when the Taiwanese government promoted digital content, it adopted the EPUB2 format—suited only to Western text—too early, and together with copyright and other issues this amounted to pulling up seedlings to make them grow. By 2012 the whole industry had even gone back to PDF and showed little interest in adopting EPUB3.

But looking back at the Chinese-related parts of the EPUB3 format at that time, I suddenly realised the standard was incomplete and had quite a few problems overall. Take vertical text: although David Hyatt of Apple’s WebKit team had conjured up a prototype like a magician, support in other browsers was still poor, and much font technology support was also needed. With the font industry less prosperous than today and information not flowing freely, waiting for operating-system support would also take a long time. Japan’s energetic push also affected Chinese1, which actually added to the problems. Without taking part in the work of international standards bodies such as W3C, these problems would probably never be solved.

Fortunately, in 2013 W3C began seeking input on digital publishing, holding three workshops on different themes in New York, Tokyo and Paris; the one in Tokyo was on ebooks and internationalisation requirements. I took part directly and raised the layout of zhuyin, the biggest problem in Taiwan. But a pile of unsolved problems remained, and raising them one by one on my own was beyond me. So I remembered the unfinished Requirements for Chinese Text Layout project of years before, and decided to see it through.

Looking Back at the Requirements for Chinese Text Layout · 2

IDPF EPUB3 meeting in Tokyo, 2013

I spent roughly a year on it: starting by translating the Requirements for Japanese Text Layout into Chinese, organising the discussions in the mailing list, going to libraries to confirm how books were set in the metal-type era, and asking veteran editors such as Lao Mao for their views, until I finally had a first draft for Traditional Chinese layout.

Doing the work is not hard; dealing with governments and organisations is politics. How could this draft be formally submitted into W3C for further work? W3C had few Taiwanese members then (now, remarkably, there are none), and as far as the Taiwanese government was concerned, the job had been done when EPUB3 was finalised; the relevant associations also saw no need to continue. So I could only keep the document on my computer and wait for an opportunity.

In October that year, W3C’s annual TPAC meeting happened to be held in Shenzhen, sponsored by Tencent, and I used the opportunity to raise the Requirements for Chinese Text Layout again. Through contact with Professor Hu Chunming and Director Li Anqi of the W3C host at Beihang University, I learned they were willing to help push the project forward together. After a meeting in Beijing the following year, with Tibetan, Uyghur and Mongolian added, the Chinese Layout Requirements Task Force was established, and I was able to take part and submit the draft as an invited expert. Honestly, calling this whole sequence of events a miracle would be no exaggeration.

As the original contributor, I have done no more than the other participants since. Later editors include Ethan Chen, who early on built the Chinese layout polyfill module “Han.css” in JavaScript while still a medical student at Peking University; and the well-known font technologist Liang Hai. The two of them contributed the sections on Simplified Chinese, Hanyu Pinyin and zhuyin. Zhang Aijie of China Mobile and Director Li Anqi of W3C helped with translation, and Xiaoqian Wu, Richard Ishida and others took on the heavy work of marking up the content structure, so that the whole document could be published in 2015 as a First Editor’s Draft supporting English, Simplified and Traditional Chinese. Later Eric Liu of TIB (Eric Q. Liu) joined, and the content is still being expanded.

What makes the Requirements for Chinese Text Layout distinctive

From a foreigner’s point of view, most people know that Chinese comes in Traditional and Simplified forms, but Chinese is used across a wide range of regions, each with its own rules and habits. In speech these may be broadly mutually intelligible, but in print, failing to follow local conventions looks odd. The most distinctive feature of the Requirements for Chinese Text Layout is that it aims to cover these local rules.

As things stand, though, there are still problems: the main authors of the Traditional Chinese parts come from Taiwan and those of the Simplified parts from the mainland, and input and contributions from Hong Kong, Macau, Singapore, Malaysia and elsewhere will be needed to fill the gaps.

How to push the Requirements for Chinese Text Layout forward

Another distinctive feature of the Requirements for Chinese Text Layout is that most of its editors are volunteers—mostly non-professionals with a deep interest in type and typesetting who treat it as a calling. This is quite different from the Requirements for Japanese Text Layout, which involved many veteran editors, or the Korean and even Mongolian requirements, which involved many scholars, but it does not compromise its professionalism.

Looking Back at the Requirements for Chinese Text Layout · 3

For me, being a volunteer means paying out of my own pocket and spending time on it. Since 2013 I have attended W3C’s international meetings at my own expense; only once did I raise money through crowdfunding—NT$100,000 to attend W3C TPAC in the Bay Area and the Books in Browsers conference held at the same time. Those who backed me then included, besides media people who had been involved early on and believed in the cause, editors such as Lao Mao and many teachers2. Although I think the Taiwanese government ought to support this, as mentioned, they think the job is done3. And with Taiwan’s ebook market stagnant, I can only cover the costs from the meagre income of my new company as it fights its way along. The pressure is considerable, but if the problems are not solved, the industry (in Taiwan) has little chance of reviving. So I don’t know how long I can keep it up; beyond the Requirements for Chinese Text Layout itself, I also use other means to get the requirements implemented, including:

    1. Raising requirements directly at meetings

The Requirements for Chinese Text Layout is only a requirements document. To make the requirements truly usable, they must go through the development of CSS standards and implementation in browsers, and then it takes several more years to become widespread (you know many people don’t like updating their operating systems). Simply waiting will only drag things out.

But W3C meetings, such as those of the CSS WG, are attended not only by specification authors but also by many browser developers, so whether through formal proposals or private discussion, there is a chance to get requirements into specifications quickly. Sometimes a conversation with a browser developer leads straight to a report in the bug tracker, and things get fixed much faster. In an age when everything can be handled through GitHub and all kinds of online tools, going to meetings to meet and get to know people and solving problems through conversation is still a very important channel.

    1. Researching how to implement the requirements

But not every layout problem can be solved through W3C; some relate to Unicode, and some need font technology. Take zhuyin layout in Taiwan: it mainly uses the ruby element, which comes from Japanese. Although after the 2013 Shenzhen meeting Robin Berjon wrote HTML ruby markup extensions, and fantasai of the CSS WG wrote CSS Ruby Layout Module, zhuyin still could not be fully supported: the tone marks get pushed to one side and have to be handled with OpenType font technology. Later I found the Taiwanese font expert But Ko to help4, and with many browser developers helping with bug reports, it is now close to complete. Going further, this font technique will be included in version 2.000 of Source Han Sans / Noto Sans CJK.

Looking Back at the Requirements for Chinese Text Layout · 4
    1. In 2013 the author presented zhuyin layout requirements to experts at the W3C workshop “Richer internationalisation for ebooks.”
    2. Reaching consensus through the community

Before the Requirements for Japanese Text Layout, Japan already had a Japanese Industrial Standard for layout, JIS X 4051 “日本語文書の組版方法.” But neither Taiwanese Traditional Chinese nor mainland Simplified Chinese had any standard document on layout. Although China has many GB/T national standards related to editorial work, they can hardly be called complete. Editors can only study what actual typesetting looks like, list the key points one by one, and reach consensus through community discussion. For example, the Peacock Project led by TIB editor Eric examines in depth the gaps in Simplified Chinese layout rules, and its findings may all be incorporated into the Requirements for Chinese Text Layout in future.

This is an important step, because Traditional Chinese has relatively few requirements. But Simplified Chinese layout is very close to Japanese, and if its rules can be established, it would greatly increase the chances of Japanese requirements being implemented—an extremely important next step.

On the content of the Requirements for Chinese Text Layout

Frankly, as the Chinese translator of the Requirements for Japanese Text Layout and having read the requirements documents for other languages, I can say that these “Requirements for X Text Layout” are long, hard to read and really difficult to understand without illustrations. The problem with the Requirements for Chinese Text Layout today is likewise a lack of illustrations (TIB readers are welcome to join the team and help provide them). Beyond that, here are a few key points of the document:

Typefaces

Western type can be cleanly divided into serif and sans-serif, and Japanese has Mincho and Gothic, but I don’t think that is enough for Chinese. In Chinese printed books, Hei actually appears less often than Kai, and in many cases—headings, extracts of classical Chinese, old poems and so on—not using Kai loses something of the flavour.

Looking Back at the Requirements for Chinese Text Layout · 5

Mainland China’s GB/T 9704-2012 “Format of official documents of Party and government organs” stipulates that “the elements of an official document are generally set in size 3 Fangsong.”

For official documents, Taiwan’s standard uses Kai for body text, while the mainland’s red-header documents use Fangsong. I think these are requirements that need to be implemented on information devices.

The issue I mentioned earlier of meeting developers in person to solve problems was about typefaces. You can now use <generic family> in 'cursive' to specify Kai (covering both Simplified and Traditional), and in CSS Font Module Level 4 there is even a newly added 'fangsong' for specifying Fangsong.

These are aimed at computer operating systems, and both Microsoft Windows and Apple’s macOS include these typefaces. For ebook reading apps, only Apple’s Books offers a wider choice of fonts. On mobile operating systems, whether iOS or Android, the only Chinese system typeface is Hei. As storage and processing power on mobile devices grow, I really hope the choice of typefaces will gradually increase5.

Punctuation

The biggest difference in layout rules between mainland Simplified Chinese and Taiwanese Traditional Chinese actually comes from punctuation. The Taiwanese Traditional standard follows the practice of the Republican era, centring punctuation in both horizontal and vertical text, which greatly simplifies the requirements and puts it further from advanced Japanese layout.

By contrast, the bottom-left punctuation used in horizontal mainland Simplified text relates directly to advanced Japanese layout and needs almost the same mechanisms to implement. When mainland Simplified books are set vertically, GB/T 15834-2011 requires punctuation positioned to the right.

In the past, because punctuation marks share the same code points in Unicode, they were distinguished by the language for which a font was designed. But Ken Lunde of Adobe is currently making a proposal to the Unicode Consortium so that a single font can switch automatically through a language-selection mechanism.

Looking Back at the Requirements for Chinese Text Layout · 6

The first batch of “standardised variation sequences for fullwidth East Asian punctuation,” proposed by Dr Ken Lunde in L2/17-436R, was accepted by Unicode in January 2018 and included in a new version.

Line-breaking rules and compression

When studying books typeset in Taiwan in the metal-type era, I found that Taiwan actually had no strict requirements for line-start and line-end prohibition rules. Perhaps because centred punctuation does not look too jarring even when not avoided. But I also found two different practices, related to the training of the compositors.

Some compositors avoided punctuation at line starts and ends and inserted leads around punctuation in loosened lines; I believe this came from training and habits formed setting Japanese books during the Japanese colonial period. Others aligned strictly both ways and rarely treated line-start or line-end punctuation, much like printed matter set before 1949.

Looking Back at the Requirements for Chinese Text Layout · 7

Many Taiwanese publications have no strict requirements for line-start and line-end prohibition rules

Later, as DTP spread, Traditional Chinese layout in Taiwan mostly adopted Japanese settings and used justification6.

For mainland Simplified Chinese, section 5.1.11 of GB/T 15834-2011 “General rules for punctuation” states that “in actual editing and publishing work, … the space occupied by punctuation marks may be appropriately compressed.” This has been discussed at length in the Peacock Project series, so I won’t repeat it; I only hope we can find consensus and write the actual practice into the Requirements for Chinese Text Layout.

But I think that for Simplified, Traditional and Japanese alike, the shared requirement is control over the size of the text block.

In Web design today, the block that displays body text usually has a fixed pixel width, which will not be a whole multiple of the text size. Browsers also let readers scale the font size themselves. So we need a mechanism in CSS to control the text block so that the line length is a whole multiple of the font size. That way it can be used whether we justify lines or, in future, use advanced punctuation compression mechanisms.

Ruby for interlinear annotation

In Chinese, the “interlinear annotation” ruby element is used in three ways7:

  1. Zhuyin
  2. Hanyu Pinyin
  3. New uses

Applying the ruby element to zhuyin is a very special case. It is now technically close to complete, and can be said to be the first instance of Chinese layout being substantially adjusted through OpenType features.

Hanyu Pinyin layout is widely used in Chinese teaching around the world. Although GB standards cover pinyin word segmentation, they have no particular rules for layout. The Peacock Project notes that pinyin still has many problems in fonts and alignment, which also await solutions—arguably quite urgently.

And under the influence of Japanese light novels in translation, the ruby element is also used for annotation in Chinese. Ancient books had the practice of interlinear notes, which this echoes.

In fact, after Japan put forward its ruby requirements, CSS and other specifications kept growing, but browser implementations are inconsistent. Many browsers still use early implementations and support none of the CSS Ruby layout adjustments. Japanese publishers, though dissatisfied with the status quo, have not pressed for improvements as long as there are no major defects. Perhaps once the requirements for Hanyu Pinyin are put forward, they will spur browsers to implement it.

Finally

I think of myself as a technology optimist.

Over these five years, working on the Requirements for Chinese Text Layout and on standardisation, I feel I have gradually become conservative. I often ask myself: can I really not accept how the Web has always been—text set in Hei, no first-line indents but a blank line between paragraphs, and ragged line ends caused by automatic line-start and line-end prohibition?

I think I cannot. For one thing, printed text arranged neatly by the rules of traditional typesetting craft still feels comfortable and easy to read to me; for another, having knocked around the tech world, I naturally understand that these situations stem from the limitations of hardware and software.

Before Retina screens, Song typefaces had to contain bitmap fonts for small sizes in order to display properly; then operating systems simply switched to Hei across the board. Chinese computer fonts not only take vast money and manpower to make, but in an era of tiny storage and memory and no good management mechanisms, they were an even greater burden.

And the world of the Web before HTML5 was always built on Western text, with very weak support for other languages. Of course, in a tech industry led by America, a culture that treats internationalisation as a priority belongs only to those early companies8. A single browser default style sheet has shaped the whole culture of text layout to this day.

Calling this “modern” strikes me as wrong; I think it is the result of shortcomings. It is like our parents and grandparents who grew up in times of famine and will always worry whether their children have eaten enough.

Chinese layout on the Web is now step by step eroding print layout in turn. But if we can affirm that the orderly rules of print layout are the basis of aesthetics and legibility, then doing something to bring them back to ebooks and Web layout in the digital age, so that the layout culture of the analogue era can be reborn, is truly necessary—and it is my wish.

Acknowledgements

Thanks to Masaaki Hagino of Voyager Japan . From making LaserDiscs with Bob Stein to the Expanded Books built with HyperCard on the Mac, these experiences are invaluable. And it was his passion for digital publishing that brought me into this field.

Thanks also to Professor Hu Chunming and Director Li Anqi of W3C Beihang, and to Richard Ishida of the W3C i18n group. Without their support and help, the Requirements for Chinese Text Layout would never have been published.

And thanks to Shi Xingji, president of BookWalker Taiwan, the Kadokawa Group ebook company, and Rex How, chairman of Locus Publishing in Taiwan. Both have extensive editorial experience, still care greatly about layout culture in their current positions, and were willing to hire me as a consultant, which has let me continue my standardisation work.

Tatsuo Kobayashi’s two books, Unicode Senki and EPUB Senki, are rare first-hand accounts of taking part in international standardisation on the front line; they have not only supported me in spirit but also offered plenty of tactical guidance.

And of course thanks to the volunteer editors of the Requirements for Chinese Text Layout; without them it would not have its present quality and substance9.

Notes:

  1. For example, in vertical text the colon “:” and semicolon “;” remain upright in Chinese but are rotated 90 degrees in Japanese, while mainland China needs them upright and offset to the right. In one generation of macOS, Chinese fonts followed Japanese practice in vertical text, because at the time Unicode Standard Annex #50: Vertical Text Layoutwas not yet complete.↩︎
  2. Perhaps it is my sense of responsibility, but these activities are no guarantee of results. Taking money from people I know to do them, I can’t help feeling I have no way to repay them. Since then I have tried to pay my own way, persuading myself to treat it as one luxurious trip a year.↩︎
  3. But this very month (October 2018), Taiwan’s Ministry of Culture announced funding for the industry association Taiwan Digital Publishing Forum to join W3C and to subsidise travel to international meetings.↩︎
  4. Github Repo↩︎
  5. Apple adopted Hiragino Mincho (branded in Chinese as “Dongqing”) early on as the serif typeface for macOS and iOS, thanks to the taste and judgement of Yasuo Kida, who joined Apple in the 1990s and was responsible for Japanese. He later also chose Yu Mincho as a text typeface for macOS, and Windows 10 followed suit. To this day I envy that greatly.↩︎
  6. Eric and I disagree strongly on this, and I did not write this part into the Requirements for Chinese Text Layout, because practice at the time was rather arbitrary and no consistent rule could be found. “Not applying line-start and line-end prohibition” is of course not modern practice, but since it was once a fact of typesetting, I feel it needs to be written into the requirements.↩︎
  7. Because I was speaking about the Requirements for Chinese Text Layout in Japan, I mentioned ruby, a layout feature Japanese people care a great deal about.↩︎
  8. In fact, looking closely, companies of the personal computer generation, such as Apple and Microsoft, care more about language support, whereas American tech companies from Google onwards (Google included) have not necessarily done as thorough a job.↩︎
  9. In this talk I seem to have tried, wittingly or not, to drag Eric deeper into this hole—not only because he is familiar with both Japanese and Chinese layout and can communicate directly with Japanese layout experts. To push Chinese and Japanese layout further through Web technology, what is needed is mainland Simplified Chinese requirements to raise the level of the requirements. Simplified Chinese is beyond my powers, so I can only hope he will use TIB as a platform to bring together education, publishing and front-line typographers to find consensus.↩︎

Related links