🌏 CJK & Pronunciation

International text, pronunciation hints for screen readers, Ruby annotations, and language-of-parts.

C# — International Accessibility
// Pronunciation hint (PDF 2.0)
var name = sect.AddChild(StructureType.Span);
name.Phoneme = "ˈniːtʃə";
name.PhoneticAlphabet =
    PdfPhoneticAlphabet.Ipa;
page.AddTaggedText(name, "Nietzsche", 170, 670);

// Language of parts
var frSpan = sect.AddChild(StructureType.Span);
frSpan.Language = "fr";  // Override to French
page.AddTaggedText(frSpan,
    "bon appétit", 190, 590);

// Ruby annotations (CJK reading aids)
var (ruby, rb, rt) =
    sect.AddRuby(includeParentheses: false);
page.AddTaggedText(rb, "Kanji", 72, 480,
    new PdfTextOptions { FontSize = 14 });
page.AddTaggedText(rt, "(reading)", 72, 498,
    new PdfTextOptions {
        FontSize = 8,
        Color = new PdfColor(0.5, 0, 0)
    });
Screenshot of the CJK and Pronunciation PDF showing a pronunciation hint for 'Nietzsche' with IPA phoneme, French text 'bon appétit' with language override, and Ruby annotations showing base text with smaller reading aid text above it

You should see three sections: "Pronunciation Hints" — a sentence containing "Nietzsche" in bold (IPA phoneme ˈniːtʃə attached in the tag tree); "Language of Parts" — a line mixing English and italic "bon appétit" (tagged with lang="fr"); "Ruby Annotations (CJK)" — the word "Kanji" with "(reading)" in small red text appearing above it as a ruby annotation.
File: 17_cjk_pronunciation.pdf

♿ Accessibility Tip

Pronunciation hints help screen readers say names correctly. Language overrides ensure the correct voice/pronunciation engine is used for multilingual content. Both are important for WCAG 3.1.2 (Language of Parts) and 3.1.6 (Pronunciation).