# V2 Subtitle Rendering System

This runbook covers `TODOS.phase-72.72.13.1.8`: the V2UI subtitle rendering
system for speaker identification, directional indicators, non-verbal sound
captions such as `[explosion]`, background color and opacity options, and size
scaling.

## Runtime Surface

The subtitle rendering profile lives in V2UI:

- C++ header: `V2/ue/Source/V2UI/Public/V2SubtitleRenderingSystem.h`
- C++ source: `V2/ue/Source/V2UI/Private/V2SubtitleRenderingSystem.cpp`
- automation spec:
  `V2/ue/Source/V2Tests/Private/UI/SubtitleRenderingSystem.spec.cpp`
- contract:
  `V2/ue/Content/V2/UI/Accessibility/SubtitleRenderingSystem_V2_Contract.json`
- focused checker: `V2/ue/Tools/check-v2-subtitle-rendering-system.py`

`FV2SubtitleRenderingSystem::BuildDefaultProfile` returns
`Accessibility.SubtitleRendering.V2` for the `HUD.Accessibility.Subtitles`
surface.

## Rendering Rules

The profile exposes cue-specific subtitle styles for Dialogue, NonVerbalSound,
and Commentary. Each `FV2SubtitleRenderingLine` resolves into an
`FV2SubtitleRenderingItem` with:

- speaker labels for dialogue and commentary;
- directional icon tokens for left, right, front, behind, and offscreen cues;
- bracketed non-verbal sound captions such as `[explosion]`;
- background color options and background opacity options;
- text scale options up to 3.0x;
- safe-area-aware subtitle anchors.

## Release Policy

The profile is valid only when it:

- identifies speakers on dialogue subtitles;
- shows directional indicators;
- renders non-verbal sound captions in brackets;
- exposes background color and opacity options;
- supports subtitle size scaling;
- keeps rendered subtitles safe-area aware.

## Verification

Run these checks after changing the subtitle rendering system:

```bash
python3 V2/ue/Tools/check-v2-subtitle-rendering-system.py
python3 V2/ue/Tools/check-v2-ui-module.py
python3 V2/ue/Tools/check-v2-ci-workflow.py
python3 V2/tools/validate-v2-docs.py
python3 -m py_compile V2/ue/Tools/check-v2-subtitle-rendering-system.py V2/ue/Tools/check-v2-ci-workflow.py
python3 -m json.tool V2/ue/Content/V2/UI/Accessibility/SubtitleRenderingSystem_V2_Contract.json
```

Automation test name:
`V2.UI.Accessibility.SubtitleRenderingSystem.AssetContract`.

## Horde Gates

- `subtitle-rendering-source`
- `subtitle-rendering-speaker-identification`
- `subtitle-rendering-directional-indicators`
- `subtitle-rendering-non-verbal-captions`
- `subtitle-rendering-background-options`
- `subtitle-rendering-size-scaling`
- `subtitle-rendering-automation`
- `subtitle-rendering-ci-wired`
