Struct hb_buffer_t

Source
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

Source

pub const MAX_LEN_FACTOR: usize = 64usize

Source

pub const MAX_LEN_MIN: usize = 16_384usize

Source

pub const MAX_LEN_DEFAULT: usize = 1_073_741_823usize

Source

pub const MAX_OPS_FACTOR: i32 = 1_024i32

Source

pub const MAX_OPS_MIN: i32 = 16_384i32

Source

pub const MAX_OPS_DEFAULT: i32 = 536_870_911i32

Source

pub fn new() -> Self

Creates a new Buffer.

Source

pub fn info_slice_mut(&mut self) -> &mut [hb_glyph_info_t]

Source

pub fn out_info(&self) -> &[hb_glyph_info_t]

Source

pub fn out_info_mut(&mut self) -> &mut [hb_glyph_info_t]

Source

fn set_out_info(&mut self, i: usize, info: hb_glyph_info_t)

Source

pub fn cur(&self, i: usize) -> &hb_glyph_info_t

Source

pub fn cur_mut(&mut self, i: usize) -> &mut hb_glyph_info_t

Source

pub fn cur_pos_mut(&mut self) -> &mut GlyphPosition

Source

pub fn prev(&self) -> &hb_glyph_info_t

Source

pub fn prev_mut(&mut self) -> &mut hb_glyph_info_t

Source

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>>>

Source

fn clear(&mut self)

Source

pub fn backtrack_len(&self) -> usize

Source

pub fn lookahead_len(&self) -> usize

Source

fn next_serial(&mut self) -> u8

Source

fn add(&mut self, codepoint: u32, cluster: u32)

Source

pub fn reverse(&mut self)

Source

pub fn reverse_range(&mut self, start: usize, end: usize)

Source

pub fn reverse_groups<F>(&mut self, group: F, merge_clusters: bool)

Source

pub fn group_end<F>(&self, start: usize, group: F) -> usize

Source

fn reset_clusters(&mut self)

Source

pub fn guess_segment_properties(&mut self)

Source

pub fn sync(&mut self) -> bool

Source

pub fn clear_output(&mut self)

Source

pub fn clear_positions(&mut self)

Source

pub fn replace_glyphs( &mut self, num_in: usize, num_out: usize, glyph_data: &[u32], )

Source

pub fn replace_glyph(&mut self, glyph_index: u32)

Source

pub fn output_glyph(&mut self, glyph_index: u32)

Source

pub fn output_info(&mut self, glyph_info: hb_glyph_info_t)

Source

pub fn copy_glyph(&mut self)

Copies glyph at idx to output but doesn’t advance idx.

Source

pub fn next_glyph(&mut self)

Copies glyph at idx to output and advance idx.

If there’s no output, just advance idx.

Source

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.

Source

pub fn skip_glyph(&mut self)

Advance idx without copying to output.

Source

pub fn reset_masks(&mut self, mask: u32)

Source

pub fn set_masks( &mut self, value: u32, mask: u32, cluster_start: u32, cluster_end: u32, )

Source

pub fn merge_clusters(&mut self, start: usize, end: usize)

Source

fn merge_clusters_impl(&mut self, start: usize, end: usize)

Source

pub fn merge_out_clusters(&mut self, start: usize, end: usize)

Source

pub fn delete_glyph(&mut self)

Merge clusters for deleting current glyph, and skip it.

Source

pub fn delete_glyphs_inplace( &mut self, filter: impl Fn(&hb_glyph_info_t) -> bool, )

Source

pub fn unsafe_to_break(&mut self, start: Option<usize>, end: Option<usize>)

Source

pub fn safe_to_insert_tatweel( &mut self, start: Option<usize>, end: Option<usize>, )

Source

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. */

Source

pub fn unsafe_to_concat(&mut self, start: Option<usize>, end: Option<usize>)

Source

pub fn unsafe_to_break_from_outbuffer( &mut self, start: Option<usize>, end: Option<usize>, )

Source

pub fn unsafe_to_concat_from_outbuffer( &mut self, start: Option<usize>, end: Option<usize>, )

Source

pub fn move_to(&mut self, i: usize) -> bool

Source

pub fn ensure(&mut self, size: usize) -> bool

Source

fn make_room_for(&mut self, num_in: usize, num_out: usize) -> bool

Source

fn shift_forward(&mut self, count: usize)

Source

fn clear_context(&mut self, side: usize)

Source

pub fn sort( &mut self, start: usize, end: usize, cmp: impl Fn(&hb_glyph_info_t, &hb_glyph_info_t) -> bool, )

Source

pub fn set_cluster(info: &mut hb_glyph_info_t, cluster: u32, mask: u32)

Source

pub(crate) fn enter(&mut self)

Source

pub(crate) fn leave(&mut self)

Source

fn _infos_find_min_cluster( &self, info: &[hb_glyph_info_t], start: usize, end: usize, cluster: Option<u32>, ) -> u32

Source

fn _infos_set_glyph_flags( &mut self, out_info: bool, start: usize, end: usize, cluster: u32, mask: u32, )

Source

pub fn is_empty(&self) -> bool

Checks that buffer contains no elements.

Source

fn push_str(&mut self, text: &str)

Source

fn set_pre_context(&mut self, text: &str)

Source

fn set_post_context(&mut self, text: &str)

Source

pub fn next_syllable(&self, start: usize) -> usize

Source

pub fn allocate_lig_id(&mut self) -> u8

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.