Closed chrissimpkins closed 3 years ago
MacBook Pro (15-inch, 2017)
3 trials with the new parallel quote formatting on eight Noto Sans Thai master sources as of https://github.com/source-foundry/ufofmt/pull/25/commits/d123d42824853b2138209614ce1e3e04b6e3bd45
real 0.45
user 0.29
sys 0.61
real 0.38
user 0.30
sys 0.58
real 0.43
user 0.27
sys 0.54
real 0.39
user 0.28
sys 0.84
real 0.42
user 0.27
sys 0.88
real 0.44
user 0.28
sys 0.88
I find it hard to believe that we are doing a full second R/W pass with edits through plist and glif files in nearly the same time, but the files are changing format with each run... 🤷
❤️ rayon
Rust is faster than fonts.
Random thought: make norad serialise to bytes so one can replace the xml declaration and write the files just once.
Rust is faster than fonts.
Random thought: make norad serialise to bytes so one can replace the xml declaration and write the files just once.
👍 https://github.com/source-foundry/ufofmt/issues/19#issuecomment-890050322
Refactored to use upstream norad implementation of XML declaration single quote formatting added in https://github.com/linebender/norad/pull/157 as of https://github.com/source-foundry/ufofmt/pull/25/commits/35e51effb2071462094a6d44399ada6f7ab79382
Will add tests then this is ready for merge IMO. Let me know if you have any suggestions/concerns about the approach.
Rebased on the new Win and macOS CI runners in main. Tests fail b/c there are different line endings on unix vs. win platforms.
Odd. I think that it may be git that is leading to the line ending discrepancies. If I push a file with line feed line endings, it is read in by Rust with line feeds on Unix platforms, but with carriage return + line feed on Windows. Something is changing the expected values. The tests now pass across platforms with valid expected line ending values using hard coded expected strings in the Rust source in place of expected value file reads.
Implementation of optional XML declaration quote style customization. Default is double quotes on declaration attributes. This PR adds a new
--singlequotes
option to the executable with format style defined by the new WriteOptions configuration in the norad lib.