@@ -7,21 +7,20 @@ use crate::layout::{Em, Length};
77use crate :: text:: { variant, SpaceElem , TextElem , TextSize } ;
88use crate :: World ;
99
10- /// Renders text in subscript.
10+ /// テキストを下付き文字でレンダリング。
1111///
12- /// The text is rendered smaller and its baseline is lowered.
12+ /// テキストは小さくレンダリングされ、ベースラインは低くなります。
1313///
14- /// # Example
14+ /// # 例
1515/// ```example
1616/// Revenue#sub[yearly]
1717/// ```
1818#[ elem( title = "Subscript" , Show ) ]
1919pub struct SubElem {
20- /// Whether to prefer the dedicated subscript characters of the font.
20+ /// フォントの下付き文字専用の字形を優先するかどうか。
2121 ///
22- /// If this is enabled, Typst first tries to transform the text to subscript
23- /// codepoints. If that fails, it falls back to rendering lowered and shrunk
24- /// normal letters.
22+ /// 有効化された場合、Typstは最初にテキストを下付き文字のコードポイントに変換できるか試します。
23+ /// 失敗した場合は、通常の文字を縮小し、位置を下げる挙動にフォールバックします。
2524 ///
2625 /// ```example
2726 /// N#sub(typographic: true)[1]
@@ -30,19 +29,17 @@ pub struct SubElem {
3029 #[ default( true ) ]
3130 pub typographic : bool ,
3231
33- /// The baseline shift for synthetic subscripts. Does not apply if
34- /// `typographic` is true and the font has subscript codepoints for the
35- /// given `body`.
32+ /// 下付き文字の合成に用いるベースラインのシフト。
33+ /// `typographic`がtrueかつ与えられた`body`に対してフォントが下付き文字のコードポイントを持っている場合は適用されません。
3634 #[ default( Em :: new( 0.2 ) . into( ) ) ]
3735 pub baseline : Length ,
3836
39- /// The font size for synthetic subscripts. Does not apply if
40- /// `typographic` is true and the font has subscript codepoints for the
41- /// given `body`.
37+ /// 下付き文字の合成に用いるフォントの大きさ。
38+ /// `typographic`がtrueかつ与えられた`body`に対してフォントが下付き文字のコードポイントを持っている場合は適用されません。
4239 #[ default( TextSize ( Em :: new( 0.6 ) . into( ) ) ) ]
4340 pub size : TextSize ,
4441
45- /// The text to display in subscript.
42+ /// 下付き文字で表示するテキスト。
4643 #[ required]
4744 pub body : Content ,
4845}
@@ -66,21 +63,20 @@ impl Show for Packed<SubElem> {
6663 }
6764}
6865
69- /// Renders text in superscript.
66+ /// テキストを上付き文字でレンダリング。
7067///
71- /// The text is rendered smaller and its baseline is raised.
68+ /// テキストは小さくレンダリングされ、ベースラインは高くなります。
7269///
73- /// # Example
70+ /// # 例
7471/// ```example
7572/// 1#super[st] try!
7673/// ```
7774#[ elem( title = "Superscript" , Show ) ]
7875pub struct SuperElem {
79- /// Whether to prefer the dedicated superscript characters of the font.
76+ /// フォントの上付き文字専用の字形を優先するかどうか。
8077 ///
81- /// If this is enabled, Typst first tries to transform the text to
82- /// superscript codepoints. If that fails, it falls back to rendering
83- /// raised and shrunk normal letters.
78+ /// 有効化された場合、Typstは最初にテキストを上付き文字のコードポイントに変換できるか試します。
79+ /// 失敗した場合は、通常の文字を縮小し、位置を上げる挙動にフォールバックします。
8480 ///
8581 /// ```example
8682 /// N#super(typographic: true)[1]
@@ -89,19 +85,17 @@ pub struct SuperElem {
8985 #[ default( true ) ]
9086 pub typographic : bool ,
9187
92- /// The baseline shift for synthetic superscripts. Does not apply if
93- /// `typographic` is true and the font has superscript codepoints for the
94- /// given `body`.
88+ /// 上付き文字の合成に用いるベースラインのシフト。
89+ /// `typographic`がtrueかつ与えられた`body`に対してフォントが上付き文字のコードポイントを持っている場合は適用されません。
9590 #[ default( Em :: new( -0.5 ) . into( ) ) ]
9691 pub baseline : Length ,
9792
98- /// The font size for synthetic superscripts. Does not apply if
99- /// `typographic` is true and the font has superscript codepoints for the
100- /// given `body`.
93+ /// 上付き文字の合成に用いるフォントの大きさ。
94+ /// `typographic`がtrueかつ与えられた`body`に対してフォントが上付き文字のコードポイントを持っている場合は適用されません。
10195 #[ default( TextSize ( Em :: new( 0.6 ) . into( ) ) ) ]
10296 pub size : TextSize ,
10397
104- /// The text to display in superscript.
98+ /// 上付き文字で表示するテキスト。
10599 #[ required]
106100 pub body : Content ,
107101}
0 commit comments