Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select_font tests fail when other fonts present on the system #217

Open
jayvdb opened this issue Nov 21, 2023 · 1 comment
Open

select_font tests fail when other fonts present on the system #217

jayvdb opened this issue Nov 21, 2023 · 1 comment

Comments

@jayvdb
Copy link
Contributor

jayvdb commented Nov 21, 2023

I am seeing the following errors, because the tests are expecting DejaVu fonts to be the result. I have DejaVu fonts installed, but other fonts are being selected. My guess is that the results I am getting are "correct" for my system.

---- test::select_best_match_sans_serif stdout ----
thread 'test::select_best_match_sans_serif' panicked at tests/select_font.rs:57:13:
assertion `left == right` failed
  left: Some("arial.ttf")
 right: Some("DejaVuSans.ttf")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- test::select_best_match_bold_sans_serif stdout ----
thread 'test::select_best_match_bold_sans_serif' panicked at tests/select_font.rs:57:13:
assertion `left == right` failed
  left: Some("arialbd.ttf")
 right: Some("DejaVuSans-Bold.ttf")

---- test::select_best_match_monospace stdout ----
thread 'test::select_best_match_monospace' panicked at tests/select_font.rs:57:13:
assertion `left == right` failed
  left: Some("SourceCodePro-Regular.otf")
 right: Some("DejaVuSansMono.ttf")

---- test::select_best_match_serif stdout ----
thread 'test::select_best_match_serif' panicked at tests/select_font.rs:57:13:
assertion `left == right` failed
  left: Some("times.ttf")
 right: Some("DejaVuSerif.ttf")
@jayvdb
Copy link
Contributor Author

jayvdb commented Nov 21, 2023

Also seeing these failures which look like the same problem

thread 'get_glyph_advance_and_origin' panicked at tests/tests.rs:555:5:
assertion `left == right` failed
  left: Ok(Vector2F(<1139, 0>))
 right: Ok(Vector2F(<1255, 0>))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- get_font_metrics stdout ----
thread 'get_font_metrics' panicked at tests/tests.rs:599:5:
assertion `left == right` failed
  left: 1854.0
 right: 1901.0

---- get_vertically_hinted_glyph_outline stdout ----
thread 'get_vertically_hinted_glyph_outline' panicked at tests/tests.rs:238:5:
assertion `left == right` failed
  left: Outline { contours: [Contour { positions: [Vector2F(<128, 1280>), Vector2F(<128, 1536>), Vector2F(<256, 1536>), Vector2F(<256, 1280>)], flags: [(empty), (empty), (empty), (empty)] }, Contour { positions: [Vector2F(<128, 0>), Vector2F(<128, 1152>), Vector2F(<256, 1152>), Vector2F(<256, 0>)], flags: [(empty), (empty), (empty), (empty)] }] }
 right: Outline { contours: [Contour { positions: [Vector2F(<136, 1316>), Vector2F(<136, 1536>), Vector2F(<316, 1536>), Vector2F(<316, 1316>)], flags: [(empty), (empty), (empty), (empty)] }, Contour { positions: [Vector2F(<136, 0>), Vector2F(<136, 1152>), Vector2F(<316, 1152>), Vector2F(<316, 0>)], flags: [(empty), (empty), (empty), (empty)] }] }

---- get_fully_hinted_glyph_outline stdout ----
thread 'get_fully_hinted_glyph_outline' panicked at tests/tests.rs:329:5:
assertion `left == right` failed
  left: Outline { contours: [Contour { positions: [Vector2F(<204.8, 1228.8>), Vector2F(<204.8, 1433.6>), Vector2F(<409.6, 1433.6>), Vector2F(<409.6, 1228.8>)], flags: [(empty), (empty), (empty), (empty)] }, Contour { positions: [Vector2F(<204.8, 0>), Vector2F(<204.8, 1024>), Vector2F(<409.6, 1024>), Vector2F(<409.6, 0>)], flags: [(empty), (empty), (empty), (empty)] }] }
 right: Outline { contours: [Contour { positions: [Vector2F(<137.6, 1228.8>), Vector2F(<137.6, 1433.6>), Vector2F(<316.80002, 1433.6>), Vector2F(<316.80002, 1228.8>)], flags: [(empty), (empty), (empty), (empty)] }, Contour { positions: [Vector2F(<137.6, 0>), Vector2F(<137.6, 1024>), Vector2F(<316.80002, 1024>), Vector2F(<316.80002, 0>)], flags: [(empty), (empty), (empty), (empty)] }] }

---- get_glyph_typographic_bounds stdout ----
thread 'get_glyph_typographic_bounds' panicked at tests/tests.rs:508:5:
assertion `left == right` failed
  left: Ok(RectF(<74, -24, 1052, 1086>))
 right: Ok(RectF(<123, -29, 1069, 1147>))

---- get_glyph_outline stdout ----
thread 'get_glyph_outline' panicked at tests/tests.rs:192:5:
assertion `left == right` failed
  left: Outline { contours: [Contour { positions: [Vector2F(<136, 1259>), Vector2F(<136, 1466>), Vector2F(<316, 1466>), Vector2F(<316, 1259>)], flags: [(empty), (empty), (empty), (empty)] }, Contour { positions: [Vector2F(<136, 0>), Vector2F(<136, 1062>), Vector2F(<316, 1062>), Vector2F(<316, 0>)], flags: [(empty), (empty), (empty), (empty)] }] }
 right: Outline { contours: [Contour { positions: [Vector2F(<193, 1120>), Vector2F(<377, 1120>), Vector2F(<377, 0>), Vector2F(<193, 0>)], flags: [(empty), (empty), (empty), (empty)] }, Contour { positions: [Vector2F(<193, 1556>), Vector2F(<377, 1556>), Vector2F(<377, 1323>), Vector2F(<193, 1323>)], flags: [(empty), (empty), (empty), (empty)] }] }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant