diff --git a/apps/reader/locales/en-US.ts b/apps/reader/locales/en-US.ts index 31ed17b8..7781a03e 100644 --- a/apps/reader/locales/en-US.ts +++ b/apps/reader/locales/en-US.ts @@ -37,6 +37,10 @@ export default { 'typography.font_size': 'Font Size', 'typography.font_weight': 'Font Weight', 'typography.line_height': 'Line Height', + 'typography.text_align': 'Text Alignment', + 'typography.text_align.default': 'Default', + 'typography.text_align.left': 'Left aligned', + 'typography.text_align.justify': 'Justified', 'typography.zoom': 'Zoom', 'theme.title': 'Theme', diff --git a/apps/reader/locales/ja-JP.ts b/apps/reader/locales/ja-JP.ts index 473dfd12..2f2a2da0 100644 --- a/apps/reader/locales/ja-JP.ts +++ b/apps/reader/locales/ja-JP.ts @@ -37,6 +37,10 @@ export default { 'typography.font_size': 'フォントサイズ', 'typography.font_weight': 'フォントウェイト', 'typography.line_height': '行の高さ', + 'typography.text_align': 'テキストの配置', + 'typography.text_align.default': 'デフォルト', + 'typography.text_align.left': '左揃え', + 'typography.text_align.justify': '両端揃え', 'typography.zoom': 'ズーム', 'theme.title': 'テーマ', diff --git a/apps/reader/locales/zh-CN.ts b/apps/reader/locales/zh-CN.ts index d11df16f..df1781da 100644 --- a/apps/reader/locales/zh-CN.ts +++ b/apps/reader/locales/zh-CN.ts @@ -37,6 +37,10 @@ export default { 'typography.font_size': '字号', 'typography.font_weight': '字重', 'typography.line_height': '行高', + 'typography.text_align': '对齐方式', + 'typography.text_align.default': '默认', + 'typography.text_align.left': '左对齐', + 'typography.text_align.justify': '两端对齐', 'typography.zoom': '缩放', 'theme.title': '颜色主题', diff --git a/apps/reader/src/components/viewlets/TypographyView.tsx b/apps/reader/src/components/viewlets/TypographyView.tsx index f7b5995b..cb2a01fc 100644 --- a/apps/reader/src/components/viewlets/TypographyView.tsx +++ b/apps/reader/src/components/viewlets/TypographyView.tsx @@ -30,7 +30,7 @@ export const TypographyView: React.FC = (props) => { const [localFonts, setLocalFonts] = useState() - const { fontFamily, fontSize, fontWeight, lineHeight, zoom, spread } = + const { fontFamily, fontSize, fontWeight, lineHeight, textAlign, zoom, spread } = scope === TypographyScope.Book ? focusedBookTab?.book.configuration?.typography ?? defaultSettings : settings @@ -162,6 +162,18 @@ export const TypographyView: React.FC = (props) => { setTypography('lineHeight', v || undefined) }} /> +