Skip to content

Commit

Permalink
Fix wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncozens committed Sep 12, 2024
1 parent 18aeee4 commit c0d265e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ pub(crate) fn diff_many_words(
wordlist: Vec<String>,
threshold: usize,
direction: Direction,
script: Option<harfruzz::Script>,
script: Option<Script>,
) -> Vec<Difference> {
let mut renderer_a = Renderer::new(font_a, font_size, direction, script);
let mut renderer_b = Renderer::new(font_b, font_size, direction, script);
Expand Down Expand Up @@ -257,16 +257,16 @@ pub(crate) fn diff_many_words(
let buffers_same = buffer_a == buffer_b;
let img_a = renderer_a.render_positioned_glyphs(&commands_a);
let img_b = renderer_b.render_positioned_glyphs(&commands_b);
let percent = count_differences(img_a, img_b, DEFAULT_GRAY_FUZZ);
if percent > threshold {
let differing_pixels = count_differences(img_a, img_b, DEFAULT_GRAY_FUZZ);
if differing_pixels > threshold {
differences.push(Difference {
word: word.to_string(),
buffer_a,
buffer_b: if buffers_same { None } else { Some(buffer_b) },
// diff_map,
ot_features: "".to_string(),
lang: "".to_string(),
percent,
differing_pixels,
})
}
}
Expand Down

0 comments on commit c0d265e

Please sign in to comment.