feat(subtitles): add line-break display toggle and narrow-space normalization

This commit is contained in:
2026-02-19 22:50:27 -08:00
parent bc75a0cfbd
commit 8c2d82e361
18 changed files with 344 additions and 6 deletions

View File

@@ -172,6 +172,7 @@ export const DEFAULT_CONFIG: ResolvedConfig = {
},
subtitleStyle: {
enableJlpt: false,
preserveLineBreaks: false,
fontFamily: 'Noto Sans CJK JP Regular, Noto Sans CJK JP, Arial Unicode MS, Arial, sans-serif',
fontSize: 35,
fontColor: '#cad3f5',
@@ -343,6 +344,14 @@ export const CONFIG_OPTION_REGISTRY: ConfigOptionRegistryEntry[] = [
'Enable JLPT vocabulary level underlines. ' +
'When disabled, JLPT tagging lookup and underlines are skipped.',
},
{
path: 'subtitleStyle.preserveLineBreaks',
kind: 'boolean',
defaultValue: DEFAULT_CONFIG.subtitleStyle.preserveLineBreaks,
description:
'Preserve line breaks in visible overlay subtitle rendering. ' +
'When false, line breaks are flattened to spaces for a single-line flow.',
},
{
path: 'subtitleStyle.frequencyDictionary.enabled',
kind: 'boolean',