@@ -7,21 +7,20 @@ use crate::layout::{Em, Length};
7
7
use crate :: text:: { variant, SpaceElem , TextElem , TextSize } ;
8
8
use crate :: World ;
9
9
10
- /// Renders text in subscript.
10
+ /// テキストを下付き文字でレンダリング。
11
11
///
12
- /// The text is rendered smaller and its baseline is lowered.
12
+ /// テキストは小さくレンダリングされ、ベースラインは低くなります。
13
13
///
14
- /// # Example
14
+ /// # 例
15
15
/// ```example
16
16
/// Revenue#sub[yearly]
17
17
/// ```
18
18
#[ elem( title = "Subscript" , Show ) ]
19
19
pub struct SubElem {
20
- /// Whether to prefer the dedicated subscript characters of the font.
20
+ /// フォントの下付き文字専用の字形を優先するかどうか。
21
21
///
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
+ /// 失敗した場合は、通常の文字を縮小し、位置を下げる挙動にフォールバックします。
25
24
///
26
25
/// ```example
27
26
/// N#sub(typographic: true)[1]
@@ -30,19 +29,17 @@ pub struct SubElem {
30
29
#[ default( true ) ]
31
30
pub typographic : bool ,
32
31
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`に対してフォントが下付き文字のコードポイントを持っている場合は適用されません。
36
34
#[ default( Em :: new( 0.2 ) . into( ) ) ]
37
35
pub baseline : Length ,
38
36
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`に対してフォントが下付き文字のコードポイントを持っている場合は適用されません。
42
39
#[ default( TextSize ( Em :: new( 0.6 ) . into( ) ) ) ]
43
40
pub size : TextSize ,
44
41
45
- /// The text to display in subscript.
42
+ /// 下付き文字で表示するテキスト。
46
43
#[ required]
47
44
pub body : Content ,
48
45
}
@@ -66,21 +63,20 @@ impl Show for Packed<SubElem> {
66
63
}
67
64
}
68
65
69
- /// Renders text in superscript.
66
+ /// テキストを上付き文字でレンダリング。
70
67
///
71
- /// The text is rendered smaller and its baseline is raised.
68
+ /// テキストは小さくレンダリングされ、ベースラインは高くなります。
72
69
///
73
- /// # Example
70
+ /// # 例
74
71
/// ```example
75
72
/// 1#super[st] try!
76
73
/// ```
77
74
#[ elem( title = "Superscript" , Show ) ]
78
75
pub struct SuperElem {
79
- /// Whether to prefer the dedicated superscript characters of the font.
76
+ /// フォントの上付き文字専用の字形を優先するかどうか。
80
77
///
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
+ /// 失敗した場合は、通常の文字を縮小し、位置を上げる挙動にフォールバックします。
84
80
///
85
81
/// ```example
86
82
/// N#super(typographic: true)[1]
@@ -89,19 +85,17 @@ pub struct SuperElem {
89
85
#[ default( true ) ]
90
86
pub typographic : bool ,
91
87
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`に対してフォントが上付き文字のコードポイントを持っている場合は適用されません。
95
90
#[ default( Em :: new( -0.5 ) . into( ) ) ]
96
91
pub baseline : Length ,
97
92
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`に対してフォントが上付き文字のコードポイントを持っている場合は適用されません。
101
95
#[ default( TextSize ( Em :: new( 0.6 ) . into( ) ) ) ]
102
96
pub size : TextSize ,
103
97
104
- /// The text to display in superscript.
98
+ /// 上付き文字で表示するテキスト。
105
99
#[ required]
106
100
pub body : Content ,
107
101
}
0 commit comments