File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -418,7 +418,7 @@ pub mod oft_metrics {
418418 pub fn analyze_font ( test_file : & str ) -> TestResult < OpentypeMetrics > {
419419 let buffer = std:: fs:: read ( std:: path:: Path :: new ( test_file) ) ?;
420420 let mut input = Parser :: new ( & buffer) ;
421- let dat = Decoder14 ( & mut input) ?;
421+ let dat = Decoder_opentype_main ( & mut input) ?;
422422 // TODO: do we want to collect (and return) any metrics here?
423423 match dat. font . directory {
424424 opentype_font_directory:: TTCHeader ( multi) => {
Original file line number Diff line number Diff line change @@ -31,12 +31,10 @@ fn test_decoder_tgz() -> TestResult {
3131
3232#[ test]
3333fn test_decoder_font ( ) -> TestResult {
34- let buffer = std :: fs :: read ( std :: path :: Path :: new ( & testpath (
34+ let metrics = analyze_font ( & testpath (
3535 "../prince/tests/data/fonts/lsansuni.ttf" ,
36- ) ) ) ?;
37- let mut input = Parser :: new ( & buffer) ;
38- let parsed_data = Decoder_opentype_main ( & mut input) ?;
39- show_opentype_stats ( & parsed_data) ;
36+ ) ) ?;
37+ show_opentype_stats ( & metrics) ;
4038 Ok ( ( ) )
4139}
4240
You can’t perform that action at this time.
0 commit comments