1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#![doc(html_root_url = "https://docs.rs/rustybuzz/0.1.0")]
#![warn(missing_docs)]
mod buffer;
mod common;
mod ffi;
mod font;
pub use crate::buffer::*;
pub use crate::common::*;
pub use crate::font::*;
pub fn shape(font: &Font<'_>, features: &[Feature], mut buffer: UnicodeBuffer) -> GlyphBuffer {
buffer.guess_segment_properties();
unsafe {
ffi::hb_shape_full(
font.as_ptr(),
buffer.0.as_ptr(),
features.as_ptr() as *mut _,
features.len() as u32,
std::ptr::null(),
)
};
GlyphBuffer(buffer.0)
}