Skip to content

Commit 5a13654

Browse files
committed
Document inputs to gsub_apply_lookup
Including note that the length of the glyphs vector will remain less than max_glyphs.
1 parent 07b5235 commit 5a13654

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/gsub.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,23 @@ pub fn gsub_lookup_would_apply<T: GlyphData>(
288288
Ok(false)
289289
}
290290

291+
/// Apply the specified lookup to the given glyphs.
292+
///
293+
/// ## Arguments
294+
///
295+
/// * `gsub_cache` - The GSUB layout cache, created via [new_layout_cache][crate::layout::new_layout_cache].
296+
/// * `gsub_table` - The GSUB layout table.
297+
/// * `opt_gdef_table` - The GDEF table, if available.
298+
/// * `lookup_index` - The index of the lookup to apply.
299+
/// * `feature_tag` - The feature tag associated with the lookup.
300+
/// * `opt_alternate` - The index of an alternate glyph in the alternate set, if available.
301+
/// * `glyphs` - The glyphs to apply the lookup to.
302+
/// * `max_glyphs` - The limit to which `glyphs` can grow through substitutions.
303+
/// The length of `glyphs` will remain less than this value. If the limit is reached,
304+
/// further substitutions will not be applied.
305+
/// * `start` - The starting index of the glyphs to apply the lookup to.
306+
/// * `length` - The length of the input sequence substituted.
307+
/// * `pred` - The predicate function to filter the glyphs to apply the lookup to.
291308
pub fn gsub_apply_lookup<T: GlyphData>(
292309
gsub_cache: &LayoutCache<GSUB>,
293310
gsub_table: &LayoutTable<GSUB>,

0 commit comments

Comments
 (0)