font: shaper dynamically allocates cell buffer

Pathlogical grapheme clusters can use a LOT of memory, so we need to be
able to grow.
This commit is contained in:
Mitchell Hashimoto
2023-09-26 17:57:50 -07:00
parent 0c9799ba61
commit 5c1fbd09cd
4 changed files with 54 additions and 99 deletions

View File

@@ -33,10 +33,6 @@ pub const Cell = struct {
/// Options for shapers.
pub const Options = struct {
/// The cell_buf argument is the buffer to use for storing shaped results.
/// This should be at least the number of columns in the terminal.
cell_buf: []Cell,
/// Font features to use when shaping. These can be in the following
/// formats: "-feat" "+feat" "feat". A "-"-prefix is used to disable
/// a feature and the others are used to enable a feature. If a feature