diff options
author | metamuffin <metamuffin@disroot.org> | 2024-07-15 17:08:18 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-07-15 17:08:18 +0200 |
commit | b13e8dfb618d475b91b73ffff28c8367442b9951 (patch) | |
tree | 59df80424c2d6568040981083186afabccac5f32 /light-client | |
parent | faa6831e33d398702b1b61c42fade0ec2e3352ee (diff) | |
download | hurrycurry-b13e8dfb618d475b91b73ffff28c8367442b9951.tar hurrycurry-b13e8dfb618d475b91b73ffff28c8367442b9951.tar.bz2 hurrycurry-b13e8dfb618d475b91b73ffff28c8367442b9951.tar.zst |
fix unicode bug
Diffstat (limited to 'light-client')
-rw-r--r-- | light-client/tools/src/bin/tex_export.rs | 2 | ||||
-rw-r--r-- | light-client/tools/src/bin/tex_pack.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/light-client/tools/src/bin/tex_export.rs b/light-client/tools/src/bin/tex_export.rs index 2132b5ed..97d4f07a 100644 --- a/light-client/tools/src/bin/tex_export.rs +++ b/light-client/tools/src/bin/tex_export.rs @@ -41,7 +41,7 @@ fn main() { let file = BufReader::new(File::open(&input).unwrap()); let tex = file.lines().map(Result::unwrap).collect::<Vec<String>>(); - let (width, height) = (tex[0].len(), tex.len()); + let (width, height) = (tex[0].chars().count(), tex.len()); let mut output = image::ImageBuffer::<Rgba<u8>, Vec<_>>::new(width as u32, height as u32); diff --git a/light-client/tools/src/bin/tex_pack.rs b/light-client/tools/src/bin/tex_pack.rs index 7ac3346c..60c409ff 100644 --- a/light-client/tools/src/bin/tex_pack.rs +++ b/light-client/tools/src/bin/tex_pack.rs @@ -32,7 +32,7 @@ fn main() { let file = BufReader::new(File::open(&path).unwrap()); let tex = file.lines().map(Result::unwrap).collect::<Vec<String>>(); let name = path.file_stem().unwrap().to_str().unwrap().to_string(); - let (width, height) = (tex[0].len(), tex.len()); + let (width, height) = (tex[0].chars().count(), tex.len()); println!("adding {width}x{height} {name}"); |