diff options
Diffstat (limited to 'svgbob/src/buffer/string_buffer.rs')
-rw-r--r-- | svgbob/src/buffer/string_buffer.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/svgbob/src/buffer/string_buffer.rs b/svgbob/src/buffer/string_buffer.rs index a0c6280..cb54cdd 100644 --- a/svgbob/src/buffer/string_buffer.rs +++ b/svgbob/src/buffer/string_buffer.rs @@ -77,10 +77,11 @@ impl From<&str> for StringBuffer { for line in s.lines() { let mut row = vec![]; for ch in line.chars() { - // TODO: deal with multi-width , zero width, fixed with string row.push(ch); - if let Some(2) = ch.width() { - row.push('\0'); + if let Some(width) = ch.width() { + for i in 1..width { + row.push('\0'); + } } } rows.push(row); |