Open shanecelis opened 6 months ago
The list-fonts example works.
> cargo run --example list-fonts | wc -l
1593
I did track down the issue. I had an extra Arial font file located in ~/Library/Fonts that the parser did not like. I removed that, and everything appears to be working now.
The error happened at this line. It would be nice if it had relayed some diagnostic information. I had to add the following before I could figure out what was going on.
// Err(e) => Err(SelectionError::CannotAccessSource),
Err(e) => {
eprintln!("error {:?} path {:?}", e, font_path);
Err(SelectionError::CannotAccessSource)
},
Here is the font file that was causing the issue. It looks like it's one of those weird files with a resource fork because it's empty according to the terminal but isn't empty according to the Finder or the zipfile.
❯ ls -l Arial
-rwxr-xr-x@ 1 shane staff 0 Apr 8 2004 Arial
❯ xattr -l Arial
com.apple.FinderInfo: FFILDMOV
com.apple.ResourceFork:
com.apple.lastuseddate#PS: ��e
I get the following error when I run the latest commit on master (6dbec44). I had a font use issue using the plotters crate, which I submitted here. Then I figured I'd check font kit.
Version Information
I'm on macOS 14.0, x86; rustc 1.75.0.