MarginaGet Margina
記事

公開

Pinyin and Furigana in Ebooks: What Ruby Text Is

Those tiny letters above Chinese and Japanese characters are called ruby text. Here is what pinyin and furigana are, how ebooks mark them up, and what can go wrong on a phone.

Why some characters wear tiny letters

Open a Japanese children's book or a Chinese reader for learners and you'll see small letters sitting above the characters. That's ruby text. It tells you how to say a character you may not know yet. Here is what ruby is, how furigana and pinyin differ, and how an ebook stores them, so you know what to expect on your phone.

What ruby text is

Ruby characters are, in the words of Wikipedia's article on the subject, small annotative glosses usually placed above or to the right of logographic characters. They show pronunciation, most often for characters the reader is likely to find unfamiliar.

The name has nothing to do with the gem. MDN explains that it began as a typesetters' unit: the smallest size text could be printed on newsprint and still be legible.

Why authors add it

Wikipedia lists four reasons an author might add ruby:

  • The character is rare.
  • The character has more than one pronunciation.
  • The readers are still learning the language.
  • The author wants a nonstandard pronunciation.

The same article notes that books with phonetic guides, pinyin especially, are popular with children and with foreigners learning Chinese.

Furigana, pinyin and zhuyin

All three are ruby. They differ in language and script, and that's about it.

Furigana is the Japanese form, also called yomigana. According to Wikipedia it appears in instructional books, newspapers, comics and children's books, and most of it is written in hiragana.

Pinyin is the common choice for Chinese in mainland China. In horizontal text it sits above the characters.

Zhuyin, also called Bopomofo, is the main system in Taiwan. It is usually written vertically, to the right of the characters.

So if a Chinese ebook shows Latin letters over the characters, that is pinyin. If a Japanese ebook shows kana over the kanji, that is furigana. If a Taiwanese edition shows Bopomofo symbols beside the characters, that is zhuyin. Our guide to vertical text in Chinese and Japanese books covers the layout side of the same books.

How ruby shows up in an ebook

An EPUB is built from web-style pages, so ruby uses the HTML ruby element. MDN describes the structure: the base text comes first, then the annotation in an rt element, with optional rp elements around it. Its own example is 漢 with the reading "Kan" and 字 with "ji", each wrapped in rp parentheses.

The rp element exists for fallback. Where ruby is not supported, the reading appears in parentheses right after the base text, so you would see something like 東京(とうきょう) instead of small letters above. W3C's accessibility technique for ruby says the same: software that supports ruby does not show the parentheses.

Browser support is old news: MDN reports the element has worked across browsers since July 2015. For books, the EPUB 3.2 content documents specification says EPUB 3 reading systems are ruby-aware, which is why it discourages rp in EPUB 3 files. The parentheses are meant for older systems.

In practice, an EPUB 3 with proper ruby markup should show the guides above the text. An older or poorly made file may show readings in brackets inline instead. Neither is corrupted. It's the same markup rendered two ways.

Limits to know about

Ruby is a display feature, so a few things behave differently from normal text.

  • Copying. Wikipedia notes that browsers generally copy the base text and not the annotation. If you copy a sentence out of a book, expect the characters without the readings.
  • Reading aloud. A January 2026 W3C note on text-to-speech and ruby says that reading the annotations instead of the base text often leads to the wrong pitch accent. If you use a screen reader or read-aloud feature, results can vary.
  • Showing and hiding. Whether you can turn the guides off belongs to your reading app, not the file. The file only carries them.

Where to go next

If you read Chinese or Japanese on a phone, check one page of a new book for ruby before you commit to it: look for guides above the characters, or readings in brackets that suggest older markup. For books to try, see our list of free Chinese classics with legal copies.

Frequently Asked Questions

What is ruby text?

Small annotations placed above or beside East Asian characters to show how they are pronounced. Furigana is the Japanese kind and pinyin is the common Chinese kind.

Is furigana the same as pinyin?

No. Both are pronunciation guides in ruby position, but furigana is mostly hiragana for Japanese, while pinyin is the Latin-letter system used for Chinese in mainland China.

Why does ruby text sometimes show up in brackets?

Where ruby is not supported, the markup falls back to the reading in parentheses right after the base text. EPUB 3 reading systems are expected to be ruby-aware, so brackets usually point to an older system or an older file.

Can I turn ruby text off?

That depends on the app. The file carries the annotations; whether you can hide them is a reading app setting.