pub struct hb_buffer_t {Show 23 fields
pub flags: BufferFlags,
pub cluster_level: u32,
pub invisible: Option<GlyphId>,
pub not_found_variation_selector: Option<u32>,
pub direction: Direction,
pub script: Option<Script>,
pub language: Option<Language>,
pub shaping_failed: bool,
pub successful: bool,
pub(crate) have_output: bool,
pub have_separate_output: bool,
pub have_positions: bool,
pub idx: usize,
pub len: usize,
pub out_len: usize,
pub info: Vec<hb_glyph_info_t>,
pub pos: Vec<GlyphPosition>,
pub context: [[char; 5]; 2],
pub context_len: [usize; 2],
pub serial: u8,
pub scratch_flags: u32,
pub max_len: usize,
pub max_ops: i32,
}
Fields§
§flags: BufferFlags
§cluster_level: u32
§invisible: Option<GlyphId>
§not_found_variation_selector: Option<u32>
§direction: Direction
§script: Option<Script>
§language: Option<Language>
§shaping_failed: bool
Shaping failure
successful: bool
Allocations successful.
have_output: bool
Whether we have an output buffer going on.
have_separate_output: bool
§have_positions: bool
Whether we have positions
idx: usize
§len: usize
§out_len: usize
§info: Vec<hb_glyph_info_t>
§pos: Vec<GlyphPosition>
§context: [[char; 5]; 2]
§context_len: [usize; 2]
§serial: u8
§scratch_flags: u32
§max_len: usize
Maximum allowed len.
max_ops: i32
Maximum allowed operations.
Implementations§
Source§impl hb_buffer_t
impl hb_buffer_t
pub const MAX_LEN_FACTOR: usize = 64usize
pub const MAX_LEN_MIN: usize = 16_384usize
pub const MAX_LEN_DEFAULT: usize = 1_073_741_823usize
pub const MAX_OPS_FACTOR: i32 = 1_024i32
pub const MAX_OPS_MIN: i32 = 16_384i32
pub const MAX_OPS_DEFAULT: i32 = 536_870_911i32
pub fn info_slice_mut(&mut self) -> &mut [hb_glyph_info_t]
pub fn out_info(&self) -> &[hb_glyph_info_t]
pub fn out_info_mut(&mut self) -> &mut [hb_glyph_info_t]
fn set_out_info(&mut self, i: usize, info: hb_glyph_info_t)
pub fn cur(&self, i: usize) -> &hb_glyph_info_t
pub fn cur_mut(&mut self, i: usize) -> &mut hb_glyph_info_t
pub fn cur_pos_mut(&mut self) -> &mut GlyphPosition
pub fn prev(&self) -> &hb_glyph_info_t
pub fn prev_mut(&mut self) -> &mut hb_glyph_info_t
pub fn digest( &self, ) -> hb_set_digest_combiner_t<hb_set_digest_bits_pattern_t<4>, hb_set_digest_combiner_t<hb_set_digest_bits_pattern_t<0>, hb_set_digest_bits_pattern_t<9>>>
fn clear(&mut self)
pub fn backtrack_len(&self) -> usize
pub fn lookahead_len(&self) -> usize
fn next_serial(&mut self) -> u8
fn add(&mut self, codepoint: u32, cluster: u32)
pub fn reverse(&mut self)
pub fn reverse_range(&mut self, start: usize, end: usize)
pub fn reverse_groups<F>(&mut self, group: F, merge_clusters: bool)
pub fn group_end<F>(&self, start: usize, group: F) -> usize
fn reset_clusters(&mut self)
pub fn guess_segment_properties(&mut self)
pub fn sync(&mut self) -> bool
pub fn clear_output(&mut self)
pub fn clear_positions(&mut self)
pub fn replace_glyphs( &mut self, num_in: usize, num_out: usize, glyph_data: &[u32], )
pub fn replace_glyph(&mut self, glyph_index: u32)
pub fn output_glyph(&mut self, glyph_index: u32)
pub fn output_info(&mut self, glyph_info: hb_glyph_info_t)
Sourcepub fn copy_glyph(&mut self)
pub fn copy_glyph(&mut self)
Copies glyph at idx to output but doesn’t advance idx.
Sourcepub fn next_glyph(&mut self)
pub fn next_glyph(&mut self)
Copies glyph at idx to output and advance idx.
If there’s no output, just advance idx.
Sourcepub fn next_glyphs(&mut self, n: usize)
pub fn next_glyphs(&mut self, n: usize)
Copies n glyphs at idx to output and advance idx.
If there’s no output, just advance idx.
Sourcepub fn skip_glyph(&mut self)
pub fn skip_glyph(&mut self)
Advance idx without copying to output.
pub fn reset_masks(&mut self, mask: u32)
pub fn set_masks( &mut self, value: u32, mask: u32, cluster_start: u32, cluster_end: u32, )
pub fn merge_clusters(&mut self, start: usize, end: usize)
fn merge_clusters_impl(&mut self, start: usize, end: usize)
pub fn merge_out_clusters(&mut self, start: usize, end: usize)
Sourcepub fn delete_glyph(&mut self)
pub fn delete_glyph(&mut self)
Merge clusters for deleting current glyph, and skip it.
pub fn delete_glyphs_inplace( &mut self, filter: impl Fn(&hb_glyph_info_t) -> bool, )
pub fn unsafe_to_break(&mut self, start: Option<usize>, end: Option<usize>)
pub fn safe_to_insert_tatweel( &mut self, start: Option<usize>, end: Option<usize>, )
Sourcefn _set_glyph_flags(
&mut self,
mask: u32,
start: Option<usize>,
end: Option<usize>,
interior: Option<bool>,
from_out_buffer: Option<bool>,
)
fn _set_glyph_flags( &mut self, mask: u32, start: Option<usize>, end: Option<usize>, interior: Option<bool>, from_out_buffer: Option<bool>, )
Adds glyph flags in mask to infos with clusters between start and end. The start index will be from out-buffer if from_out_buffer is true. If interior is true, then the cluster having the minimum value is skipped. */
pub fn unsafe_to_concat(&mut self, start: Option<usize>, end: Option<usize>)
pub fn unsafe_to_break_from_outbuffer( &mut self, start: Option<usize>, end: Option<usize>, )
pub fn unsafe_to_concat_from_outbuffer( &mut self, start: Option<usize>, end: Option<usize>, )
pub fn move_to(&mut self, i: usize) -> bool
pub fn ensure(&mut self, size: usize) -> bool
fn make_room_for(&mut self, num_in: usize, num_out: usize) -> bool
fn shift_forward(&mut self, count: usize)
fn clear_context(&mut self, side: usize)
pub fn sort( &mut self, start: usize, end: usize, cmp: impl Fn(&hb_glyph_info_t, &hb_glyph_info_t) -> bool, )
pub fn set_cluster(info: &mut hb_glyph_info_t, cluster: u32, mask: u32)
pub(crate) fn enter(&mut self)
pub(crate) fn leave(&mut self)
fn _infos_find_min_cluster( &self, info: &[hb_glyph_info_t], start: usize, end: usize, cluster: Option<u32>, ) -> u32
fn _infos_set_glyph_flags( &mut self, out_info: bool, start: usize, end: usize, cluster: u32, mask: u32, )
fn push_str(&mut self, text: &str)
fn set_pre_context(&mut self, text: &str)
fn set_post_context(&mut self, text: &str)
pub fn next_syllable(&self, start: usize) -> usize
pub fn allocate_lig_id(&mut self) -> u8
Auto Trait Implementations§
impl Freeze for hb_buffer_t
impl RefUnwindSafe for hb_buffer_t
impl Send for hb_buffer_t
impl Sync for hb_buffer_t
impl Unpin for hb_buffer_t
impl UnwindSafe for hb_buffer_t
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more