# text-vertical

--

| Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release |
|---|---|---|---|---|
| October 21, 2026 | - | - | [1.0.0-beta03](https://developer.android.com/jetpack/androidx/releases/text-vertical#1.0.0-beta03) | - |

## Declaring dependencies

To add a dependency on Text, you must add the Google Maven repository to your
project. Read [Google's Maven repository](https://developer.android.com/studio/build/dependencies#google-maven)
for more information.

Add the dependencies for the artifacts you need in the `build.gradle` file for
your app or module:

### Groovy

```groovy
dependencies {
    implementation "androidx.text:text-vertical:1.0.0-beta03"
}
```

### Kotlin

```kotlin
dependencies {
    implementation("androidx.text:text-vertical:1.0.0-beta03")
}
```

For more information about dependencies, see [Add build dependencies](https://developer.android.com/studio/build/dependencies).

## Feedback

Your feedback helps make Jetpack better. Let us know if you discover new issues or have
ideas for improving this library. Please take a look at the
[existing issues](https://issuetracker.google.com/issues?q=componentid:1909646+status:open)
in this library before you create a new one. You can add your vote to an existing issue by
clicking the star button.

[Create a new issue](https://issuetracker.google.com/issues/new?component=1909646&template=2203168)

See the [Issue Tracker documentation](https://developers.google.com/issue-tracker)
for more information.

## Version 1.0

### Version 1.0.0-beta03

October 21, 2026

`androidx.text:text-vertical:1.0.0-beta03` and `androidx.text:text-vertical-compose:1.0.0-beta03` are released. Version 1.0.0-beta03 contains [these commits](https://android.googlesource.com/platform/frameworks/support/+log/b2b5ae7b0fe1bb4eece7018878fe5f18c5967a2f..5a2352ffc8afa3fb5a17bd7eb0c70ee5638bad18/text).

**Note:** This is intended to be the last beta release.

**New Features**

- Added a "Subtitle Cue" tab to `VerticalTextSampleActivity` to demonstrate `VerticalText` capabilities, including rendering with wrapped height, `toVerticalTextStyle()`, `RubySpan`, `EmphasisSpan`, Tate-chu-yoko, `FontShearSpan`, `UnderlineSpan`, and `StrikethroughSpan`. [I4799d1](https://android-review.googlesource.com/q/I4799d1fec43f8be481c55c263599c3ed5def5f72) [b/571750156](https://buganizer.corp.google.com/issues/571750156)

**Bug Fixes**

- Fixed horizontal `RubySpan` and `EmphasisSpan` line height when using fonts with large top and bottom padding such as Noto Sans JP. ([Ib0507](https://android-review.googlesource.com/#/q/Ib050716b4c36d500af06c51c094886db1209b6fa), [b/557316470](https://issuetracker.google.com/issues/557316470)) - *Thanks for the report, Numero-san!*
- Updated Compose dependencies to `1.12.1`. ([I9ee7f](https://android-review.googlesource.com/#/q/I9ee7fd42956442635d8ca52c9fde4573a701e65e), [b/569780191](https://issuetracker.google.com/issues/569780191))
- `VerticalText` now applies `AnnotatedString` span styles and preserves `AnnotatedString` spans and annotations in semantics. ([Ib077f](https://android-review.googlesource.com/#/q/Ib077f6a7ea19193cebc8ee4c9ca6a65ddb300b91), [b/502088091](https://issuetracker.google.com/issues/502088091))
- Fixed `RubySpan` and `EmphasisSpan` not filling the background color of `TextPaint.bgColor` or `BackgroundColorSpan` in horizontal layout. ([I66ba8](https://android-review.googlesource.com/#/q/I66ba8e34efdf50d2c5242dc1f7c51a05e042200a), [b/561269843](https://issuetracker.google.com/issues/561269843))
- Fixed background colors in vertical text that were drawn as outlines after a span set `Paint.Style.STROKE`. ([I692ed](https://android-review.googlesource.com/#/q/I692edf199eb8203fc2a0b54cbd1a7148a16c21f1), [b/566429122](https://issuetracker.google.com/issues/566429122))
- `CharacterStyle` spans that cover a full `RubySpan` range in `VerticalTextLayout` now also apply to the ruby text, and `RubySpan.textScale` scales the font sizes that they set. Background colors now also fill the empty space above and below the shorter of the ruby text and the base text. ([I0dadc](https://android-review.googlesource.com/#/q/I0dadc5a595659c9c6cddde5851b0751cf7ada4d1), [b/564268825](https://issuetracker.google.com/issues/564268825))
- Fixed `VerticalTextLayout` background height when upright text has multiple style runs. ([I7e31a](https://android-review.googlesource.com/#/q/I7e31a64437ea4e306ca197bc65f6358c8eb87495), [b/565211671](https://issuetracker.google.com/issues/565211671))
- Fixed `VerticalText` retaining a stale background color when `VerticalTextStyle.background` changes to `Color.Unspecified`. ([Ia0861](https://android-review.googlesource.com/#/q/Ia0861af33b5110db66c0e2f8a81b4b17087376f5), [b/565211671](https://issuetracker.google.com/issues/565211671))
- Fixed horizontal ruby and emphasis layouts skipping `TextPaint` fields when copying the caller paint. ([Ia3043](https://android-review.googlesource.com/#/q/Ia3043b72aa8155437aed08a17fddf19a197c0eac), [b/561269843](https://issuetracker.google.com/issues/561269843))
- `VerticalText` now draws the background color from `VerticalTextStyle.background` behind plain `String` text and behind plain `String` ruby annotations in `RubySpan`. ([If0493](https://android-review.googlesource.com/#/q/If04930c29fdac4297afa9593176349cf45f80905), [b/564268825](https://issuetracker.google.com/issues/564268825))
- Fixed horizontal ruby layout leaving the shared working paint scaled after initialization. ([I33760](https://android-review.googlesource.com/#/q/I3376022398a402d632d9d55ec310154607802fcb), [b/561269843](https://issuetracker.google.com/issues/561269843))
- Fixed the vertical text sample app so that a pan gesture cannot move the text out of view. ([If0108](https://android-review.googlesource.com/#/q/If01084db6c6a72bcb665f803788860b1202aad70), [b/563461635](https://issuetracker.google.com/issues/563461635))
- Fixed the test app to demo emphasis mark position ([I3ffa3](https://android-review.googlesource.com/#/q/I3ffa3802cea6a2301afd8827d0c32db91261a9f5), [b/559972132](https://issuetracker.google.com/issues/559972132))
- Added Kex symbolic execution branch tests for `LineLayout`, `TextUtils`, `CanvasCompat`, and `PaintCompat`. [I47edf](https://android-review.googlesource.com/q/I47edfe364a9eea5ee7c7be9bfbd01115827808b1) [b/569212211](https://buganizer.corp.google.com/issues/569212211)

### Version 1.0.0-beta02

September 23, 2026

`androidx.text:text-vertical:1.0.0-beta02` and `androidx.text:text-vertical-compose:1.0.0-beta02` are released. Version 1.0.0-beta02 contains [these commits](https://android.googlesource.com/platform/frameworks/support/+log/f3ed195f0c9ef9eafe437351d974c9ec49ecc2ea..b2b5ae7b0fe1bb4eece7018878fe5f18c5967a2f/text).

**Important Changes**

- We have added test cases to ensure backward compatibility down to **API 24 (Android 7.0)**, and the results have been highly positive!
- The libraries now target Kotlin 2.2 and require kotlinc 2.2 ([I82396](https://android-review.googlesource.com/#/q/I823967fe6b9524b448184ef366c562316bd6a323), [b/498369605](https://issuetracker.google.com/issues/498369605))
- The vertical text libraries now compile against SDK 37. Apps that use them must compile against SDK 37 and use AGP 9.1.0 or later. ([I0f757](https://android-review.googlesource.com/#/q/I0f757083a8068bdc06d31b94842e5a5471d699b5), [b/562182206](https://issuetracker.google.com/issues/562182206))

**Bug Fixes**

- `EmphasisSpan.position` now moves the emphasis mark. `AnnotationPosition.Before` puts the mark above horizontal text and right of vertical text. `AnnotationPosition.After` puts it on the opposite side. ([Ic9bfd](https://android-review.googlesource.com/#/q/Ic9bfdc67d49dcc3b3329fc1b8be9ad7bbc0be1d6), [b/559972132](https://issuetracker.google.com/issues/559972132))
- Fixed the emphasis mark scale in horizontal text layout. The reserved line height no longer assumes an unscaled mark. ([I6d7fe](https://android-review.googlesource.com/#/q/I6d7feec59f8090ac78bb145e58d75c277c25895b), [b/562254557](https://issuetracker.google.com/issues/562254557))
- Fixed the backport for vertical text advances. The backport ignored the requested offset on API levels less than 34. ([I8877a](https://android-review.googlesource.com/#/q/I8877a21180e95f54d2901e5ee97f213803ea92c4), [b/495457561](https://issuetracker.google.com/issues/495457561))
- Fixed horizontal ruby text reserving too much vertical space on API levels below 28, which could leave a line taller than necessary. ([Iceb60](https://android-review.googlesource.com/#/q/Iceb605ffba433f0866e2435e0374bd52dcdd24bb), [b/561323466](https://issuetracker.google.com/issues/561323466))
- The tests for vertical ruby and text orientation now run on all supported API levels. ([If07d4](https://android-review.googlesource.com/#/q/If07d41a7fbea93d0cea77fda3d948eeaa838da7e), [b/495457561](https://issuetracker.google.com/issues/495457561))
- `androidx.lifecycle:lifecycle-runtime` dependency was updated to 2.10.0. This version is required for bundled lifecycle runtime lint checks to run with AGP version 9.5.0-alpha04 or later. ([I7264b](https://android-review.googlesource.com/#/q/I7264b7e87c38200b34c13e382a16a86fa0a7d2e6), [b/556807521](https://issuetracker.google.com/issues/556807521))
- Fixed `RubySpan.position` being ignored in horizontal text layout. `AnnotationPosition.After` now correctly renders ruby text below the base text. ([Iaffa1](https://android-review.googlesource.com/#/q/Iaffa1b09f0eaffb80cbdb41929530ed39e9d6253), [b/559972124](https://issuetracker.google.com/issues/559972124), [b/561323466](https://issuetracker.google.com/issues/561323466))
- Fixed `RubySpan.position` being ignored in vertical text layout. `AnnotationPosition.After` now correctly renders ruby text on the left side of the base text. ([I0be1c](https://android-review.googlesource.com/#/q/I0be1c5e85092cf7859d6505d5381bc668ef50959), [b/495457561](https://issuetracker.google.com/issues/495457561))
- Upgrade Compose dependencies to 1.11.4 ([I9ef07](https://android-review.googlesource.com/#/q/I9ef070aeb2f36731da25ecf5ef5220ec34616f2d), [b/536925341](https://issuetracker.google.com/issues/536925341))

### Version 1.0.0-beta01

August 26, 2026

`androidx.text:text-vertical:1.0.0-beta01` and `androidx.text:text-vertical-compose:1.0.0-beta01` are released. Version 1.0.0-beta01 contains [these commits](https://android.googlesource.com/platform/frameworks/support/+log/61ee8cd421d0c0252d8db0253b739de537999371..f3ed195f0c9ef9eafe437351d974c9ec49ecc2ea/text).

**API Changes**

- Changed `VerticalTextScope` from an interface to a concrete class. ([I44e71](https://android-review.googlesource.com/#/q/I44e71a46358c3633ef255d86e7a8d197c94268a3), [b/549288808](https://issuetracker.google.com/issues/549288808))

**Bug Fixes**

- Updated documentation for `combineUpright`. ([Ib534b](https://android-review.googlesource.com/#/q/Ib534bdb45f74a9174f9a543bee1d687209cd46ea), [b/548992014](https://issuetracker.google.com/issues/548992014))
- Removed incorrect API 36 minimum requirement documentation from `VerticalText`. ([I4f8e9](https://android-review.googlesource.com/#/q/I4f8e9874ad7975354776c09609709d2f9c700f34), [b/549288799](https://issuetracker.google.com/issues/549288799))
- Used calculated ascent ratio for vertical baseline offset in backport mode ([07339d7](https://android.googlesource.com/platform/frameworks/support/+/07339d708aa73fb814e9547ffa54d308071bd724), [b/502088091](https://issuetracker.google.com/issues/502088091))

### Version 1.0.0-alpha06

July 29, 2026

`androidx.text:text-vertical:1.0.0-alpha06` and `androidx.text:text-vertical-compose:1.0.0-alpha06` are released. Version 1.0.0-alpha06 contains [these commits](https://android.googlesource.com/platform/frameworks/support/+log/df4b49eda6f6834b6bc4c8aa30a581fa577a511e..61ee8cd421d0c0252d8db0253b739de537999371/text).

**Important Changes**

- This release marks the final planned alpha version of the library.
- Finalized and refined the parameters in the `VerticalText` composable

**API Changes**

- Introduced `VerticalTextStyle` for vertical text layout. ([I647a8](https://android-review.googlesource.com/#/q/I647a8f1f681b019f2a306575f9a83a73fd4602e3), [b/512424512](https://issuetracker.google.com/issues/512424512))
- Introduced a new public DSL (`VerticalTextScope` and `buildVerticalText`) in the `text-vertical-compose` library ([I6faa7](https://android-review.googlesource.com/#/q/I6faa75247b091a6bbc6e7f209e0c467e7a39b073), [b/502088091](https://issuetracker.google.com/issues/502088091))
- Introduce `VerticalText` composable ([I96509](https://android-review.googlesource.com/#/q/I96509c991366dfbd411b8125ba550753abda83fe), [b/502088091](https://issuetracker.google.com/issues/502088091))

**Bug Fixes**

- Clarified documentation for `VerticalTextLayout` fallback behavior on older API levels. ([Ia7ccc](https://android-review.googlesource.com/#/q/Ia7ccc156c5c1d1a8b69c106b331b8f1f7a89a304), [b/449184326](https://issuetracker.google.com/issues/449184326))

### Version 1.0.0-alpha05

April 22, 2026

`androidx.text:text-vertical:1.0.0-alpha05` and `androidx.text:text-vertical-compose:1.0.0-alpha05` are released. Version 1.0.0-alpha05 contains [these commits](https://android.googlesource.com/platform/frameworks/support/+log/951845221205b7a428a9d779107760fc929863ee..df4b49eda6f6834b6bc4c8aa30a581fa577a511e/text).

**New Features**

- Added Composable functions to support vertical text layout, aligning with Google's Compose-first initiative.

**API Changes**

- Introduced `:text:text-vertical-compose` library artifact. ([I939e4](https://android-review.googlesource.com/#/q/I939e4862996f64c79975568aa3249016ccda19ab))
- Added `lineCount` property to `VerticalTextLayout` class. ([I93884](https://android-review.googlesource.com/#/q/I93884649fdcbc7be076446b5fe7d75e15f58b84d), [b/502088091](https://issuetracker.google.com/issues/502088091))

**Bug Fixes**

- Updated KDoc documentation for clarity and accuracy. ([I71c8f](https://android-review.googlesource.com/#/q/I71c8ffd6d4b2987bb7abc1a090133501d25a766c), [b/449184326](https://issuetracker.google.com/issues/449184326))

### Version 1.0.0-alpha04

April 08, 2026

`androidx.text:text-vertical:1.0.0-alpha04` is released. Version 1.0.0-alpha04 contains [these commits](https://android.googlesource.com/platform/frameworks/support/+log/4f1927c2c3b66d0c3a6b9118974d818d2dc5a06a..966cd4961ea7030c43c4afe234f0c8a4472f8160/text/text-vertical).

**New Features**

- Refactored all public classes to provide more convenient, idiomatic Kotlin APIs for general usage, while maintaining strong Java interoperability.

**API Changes**

- Added a default zero-argument constructor to `FontShearSpan` for Java compatibility ([I73065](https://android-review.googlesource.com/#/q/I730658f1c6d29b291b6a9493e3ccc40f0ada4764), [b/493692287](https://issuetracker.google.com/issues/493692287)).
- Removed the `Parcelable` implementation in `RubySpan` and `EmphasisSpan` ([I49884](https://android-review.googlesource.com/#/q/I49884b2585ece811bb85a86d7b100c68d10f116d), [b/493693386](https://issuetracker.google.com/issues/493693386)).
- Refactored `EmphasisSpan` for better compatibility ([I34c40](https://android-review.googlesource.com/#/q/I34c40e89606a520b3a6a8d3d3f5c4cc531da6fc5), [b/493693310](https://issuetracker.google.com/issues/493693310)).
- Refactored `AnnotationPosition` to improve API surface ([I10dce](https://android-review.googlesource.com/#/q/I10dce948b769873d68c64077b4d96997cc2fa37e), [b/493693386](https://issuetracker.google.com/issues/493693386)).
- Converted `TextOrientation` to an enum class, refactored `AnnotationPosition` to a sealed class, and removed `RubySpan.Builder` ([Ib4a77](https://android-review.googlesource.com/#/q/Ib4a77651cdd2f3c7aa320ba6ef6d51c7965b7283), [b/493693386](https://issuetracker.google.com/issues/493693386)).
- Added the `AnnotationPosition` enum and refactored the `RubySpan` class ([Ibfcff](https://android-review.googlesource.com/#/q/Ibfcff6f417bbb5bdf79998fa7876e5cec79bb93a), [b/493692426](https://issuetracker.google.com/issues/493692426)).
- Refactored `TextOrientation` for general usage and improved internal text scaling extensions ([I82152](https://android-review.googlesource.com/#/q/I821529f1e8457a5541a66e55907ea04aa88104c9), [b/493692428](https://issuetracker.google.com/issues/493692428)).

### Version 1.0.0-alpha03

March 25, 2026

`androidx.text:text-vertical:1.0.0-alpha03` is released. Version 1.0.0-alpha03 contains [these commits](https://android.googlesource.com/platform/frameworks/support/+log/4350deab5806bf95370a4d012d7eeaa70a10be44..1abcb4178d48853948b9b566cabff9222d90ab69/text/text-vertical).

**New Features**

- `VerticalTextLayout` now supports the horizontal layout, to display special spans in Japanese such as Ruby and Emphasis (Boten).

**API Changes**

- `RubySpan` and `EmphasisSpan` now inherit ReplacementSpan for supporting them for horizontal text ([I38db6](https://android-review.googlesource.com/#/q/I38db6f5fd0676dc0fdf0433dd81e53fe3c7fc981), [b/447239659](https://issuetracker.google.com/issues/447239659), [b/447224892](https://issuetracker.google.com/issues/447224892))

### Version 1.0.0-alpha02

October 08, 2025

`androidx.text:text-vertical:1.0.0-alpha02` is released. Version 1.0.0-alpha02 contains [these commits](https://android.googlesource.com/platform/frameworks/support/+log/cd8ce2bdb21194a81a76325a8e65dad5d7e28681..4350deab5806bf95370a4d012d7eeaa70a10be44/text/text-vertical).

**New Features**

- Added `VerticalTextLayout#isVerticalTextLayoutSupported()` method to check capability of vertical text ([Ie2802](https://android-review.googlesource.com/#/q/Ie2802d542557658d06c3d90b5dc10d0f8677aad7), [b/442608654](https://issuetracker.google.com/issues/442608654))

**API Changes**

- Introduced a graceful fallback in API \< 36.([I8a67a](https://android-review.googlesource.com/#/q/I8a67aa87031b6e322fb9fd1671090f873ba5d760), [b/442608654](https://issuetracker.google.com/issues/442608654))
- Downgrade `minSDK` to 23 to be used in other AndroidX libraries ([I2d6b5](https://android-review.googlesource.com/#/q/I2d6b55e7148e919f16d810712893a567a36ce9d7), [b/442608654](https://issuetracker.google.com/issues/442608654))

### Version 1.0.0-alpha01

August 27, 2025

`androidx.text:text-vertical:1.0.0-alpha01` is released. Version 1.0.0-alpha01 contains [these commits](https://android.googlesource.com/platform/frameworks/support/+log/cd8ce2bdb21194a81a76325a8e65dad5d7e28681/text/text-vertical).

**New Features**

- A new vertical text library to support vertical text layout mainly for Japanese, by leveraging the new [VERTICAL_TEXT_FLAG](https://developer.android.com/reference/android/graphics/Paint#VERTICAL_TEXT_FLAG) flag added in Android 16.
- Added `VerticalTextLayout` that displayed vertical text with proper line breaks, mixed orientation (e.g., horizontal Latin characters within a vertical line), and ruby text. ([8b3a10](https://android.googlesource.com/platform/frameworks/support/+/8b3a10cb8bc1ad17da5da6bb1386499453a4899e))
- Added `FontShearSpan` for italic-like style in vertical text. ([1ffd78](https://android.googlesource.com/platform/frameworks/support/+/1ffd782e24d6143a899c18c1599a95cab0d6cf64))
- Added `EmphasisRun` for emphasis marks. ([fe12d9](https://android.googlesource.com/platform/frameworks/support/+/fe12d9efff8394cfed4717324fe5dc648dc1e927))