@@ -39,20 +39,20 @@ use crate::{Direction, Language};
39
39
///
40
40
/// * Direction: The direction in which the output glyphs flow. This is
41
41
/// typically left to right or right to left. This is controlled via
42
- /// the [`set_direction`] method on `Buffer` .
42
+ /// the [`Buffer:: set_direction() `] method.
43
43
/// * Script: Script is crucial for choosing the proper shaping behaviour
44
44
/// for scripts that require it (e.g. Arabic) and the which OpenType
45
45
/// features defined in the font to be applied. This is controlled via
46
- /// the [`set_script`] method on `Buffer` .
46
+ /// the [`Buffer:: set_script() `] method.
47
47
/// * Language: Languages are crucial for selecting which OpenType feature
48
48
/// to apply to the buffer which can result in applying language-specific
49
49
/// behaviour. Languages are orthogonal to the scripts, and though they
50
50
/// are related, they are different concepts and should not be confused
51
- /// with each other. This is controlled via the [`set_language`] method
52
- /// on `Buffer` .
51
+ /// with each other. This is controlled via the [`Buffer:: set_language()`]
52
+ /// method .
53
53
///
54
54
/// Additionally, Harfbuzz can attempt to infer the values for these
55
- /// properties using the [`guess_segment_properties`] method on `Buffer` :
55
+ /// properties using the [`Buffer:: guess_segment_properties() `] method:
56
56
///
57
57
/// ```
58
58
/// # use harfbuzz::{Buffer, Direction, sys};
@@ -61,11 +61,6 @@ use crate::{Direction, Language};
61
61
/// assert_eq!(b.get_direction(), Direction::RTL);
62
62
/// assert_eq!(b.get_script(), sys::HB_SCRIPT_ARABIC);
63
63
/// ```
64
- ///
65
- /// [`set_direction`]: #method.set_direction
66
- /// [`set_script`]: #method.set_script
67
- /// [`set_language`]: #method.set_language
68
- /// [`guess_segment_properties`]: #method.guess_segment_properties
69
64
pub struct Buffer {
70
65
/// The underlying `hb_buffer_t` from the `harfbuzz-sys` crate.
71
66
///
@@ -193,7 +188,7 @@ impl Buffer {
193
188
/// that has a script other than `HB_SCRIPT_COMMON`,
194
189
/// `HB_SCRIPT_INHERITED`, and `HB_SCRIPT_UNKNOWN`.
195
190
///
196
- /// Next, if buffer direction is not set (ie. is `Direction::Invalid`),
191
+ /// Next, if buffer direction is not set (ie. is [ `Direction::Invalid`] ),
197
192
/// it will be set to the natural horizontal direction of the buffer
198
193
/// script as returned by `hb_script_get_horizontal_direction()`.
199
194
///
@@ -212,12 +207,12 @@ impl Buffer {
212
207
///
213
208
/// See also:
214
209
///
215
- /// * [`get_direction`](#method.get_direction)
216
- /// * [`set_direction`](#method.set_direction)
217
- /// * [`get_script`](#method.get_script)
218
- /// * [`set_script`](#method.set_script)
219
- /// * [`get_language`](#method.get_language)
220
- /// * [`set_language`](#method.set_language)
210
+ /// * [`Buffer:: get_direction`]
211
+ /// * [`Buffer:: set_direction`]
212
+ /// * [`Buffer:: get_script`]
213
+ /// * [`Buffer:: set_script`]
214
+ /// * [`Buffer:: get_language`]
215
+ /// * [`Buffer:: set_language`]
221
216
pub fn guess_segment_properties ( & mut self ) {
222
217
unsafe { sys:: hb_buffer_guess_segment_properties ( self . raw ) } ;
223
218
}
@@ -234,8 +229,8 @@ impl Buffer {
234
229
///
235
230
/// See also:
236
231
///
237
- /// * [`get_direction`](#method.get_direction)
238
- /// * [`guess_segment_properties`](#method.guess_segment_properties)
232
+ /// * [`Buffer:: get_direction()`]
233
+ /// * [`Buffer:: guess_segment_properties()`]
239
234
pub fn set_direction ( & mut self , direction : Direction ) {
240
235
unsafe { sys:: hb_buffer_set_direction ( self . raw , direction. into ( ) ) } ;
241
236
}
@@ -244,7 +239,7 @@ impl Buffer {
244
239
///
245
240
/// See also:
246
241
///
247
- /// * [`set_direction`](#method.set_direction)
242
+ /// * [`Buffer:: set_direction()`]
248
243
pub fn get_direction ( & self ) -> Direction {
249
244
( unsafe { sys:: hb_buffer_get_direction ( self . raw ) } ) . into ( )
250
245
}
@@ -257,8 +252,8 @@ impl Buffer {
257
252
///
258
253
/// See also:
259
254
///
260
- /// * [`get_script`](#method.get_script)
261
- /// * [`guess_segment_properties`](#method.guess_segment_properties)
255
+ /// * [`Buffer:: get_script()`]
256
+ /// * [`Buffer:: guess_segment_properties()`]
262
257
pub fn set_script ( & mut self , script : sys:: hb_script_t ) {
263
258
unsafe { sys:: hb_buffer_set_script ( self . raw , script) } ;
264
259
}
@@ -267,7 +262,7 @@ impl Buffer {
267
262
///
268
263
/// See also:
269
264
///
270
- /// * [`set_script`](#method.set_script)
265
+ /// * [`Buffer:: set_script()`]
271
266
pub fn get_script ( & self ) -> sys:: hb_script_t {
272
267
unsafe { sys:: hb_buffer_get_script ( self . raw ) }
273
268
}
@@ -282,8 +277,8 @@ impl Buffer {
282
277
///
283
278
/// See also:
284
279
///
285
- /// * [`get_language`](#method.get_language)
286
- /// * [`guess_segment_properties`](#method.guess_segment_properties)
280
+ /// * [`Buffer:: get_language()`]
281
+ /// * [`Buffer:: guess_segment_properties()`]
287
282
pub fn set_language ( & mut self , language : Language ) {
288
283
unsafe { sys:: hb_buffer_set_language ( self . raw , language. as_raw ( ) ) } ;
289
284
}
@@ -292,7 +287,7 @@ impl Buffer {
292
287
///
293
288
/// See also:
294
289
///
295
- /// * [`set_language`](#method.set_language)
290
+ /// * [`Buffer:: set_language()`]
296
291
pub fn get_language ( & self ) -> Language {
297
292
unsafe { Language :: from_raw ( sys:: hb_buffer_get_language ( self . raw ) ) }
298
293
}
0 commit comments