text-autospace treats <rt> text as main text flow

#523134883 Filed 2026-06-12 P3 / S3 Blink>Layout

Live repro

These samples force text-autospace: normal. Ruby annotation text in <rt> should not participate in main-line autospace boundary detection. Compare the live rendered row with the expected reference row.

Bug 1 unwanted spacing

Live rendered<rt> is Latin
kan
Expectedcaptured from patched content_shell
Expected output with no gap between the ruby base and following ideograph

Expected main-line comparison: vs .

Bug 2 missing spacing

Live rendered<rt> is kana
かんabc
Expectedcaptured from patched content_shell
Expected output with spacing between the ruby base and following Latin text

Expected main-line comparison: vs a.

Repro source

<style>
  .case { text-autospace: normal; font-size: 56px; }
</style>

<div class="case"><ruby>漢<rt>kan</rt></ruby>字</div>
<div class="case"><ruby>漢<rt>かん</rt></ruby>abc</div>

Expected behavior

Ruby annotations are out of the main text flow

Autospace should use adjacent main-line characters only. It should ignore <rt> annotation text when deciding ideograph-alpha spacing.

In the first case no spacing should be inserted between two ideographs. In the second case spacing should be inserted between the ideograph and the following Latin text.

Links

Open Chromium issue