I use the file:// scheme for viewing docs generated with rustdoc. In firefox I get the following errors when loading fonts:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///home/rdodd/devel/non-work/draw2d/target/doc/SourceSerifPro-Regular.woff. (Reason: CORS request not http).[Learn More]
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///home/rdodd/devel/non-work/draw2d/target/doc/FiraSans-Regular.woff. (Reason: CORS request not http).[Learn More]
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///home/rdodd/devel/non-work/draw2d/target/doc/FiraSans-Medium.woff. (Reason: CORS request not http).[Learn More]
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///home/rdodd/devel/non-work/draw2d/target/doc/SourceCodePro-Regular.woff. (Reason: CORS request not http).[Learn More]
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///home/rdodd/devel/non-work/draw2d/target/doc/SourceCodePro-Semibold.woff. (Reason: CORS request not http).[Learn More]
Is there a way to tell firefox that when the main page is file://, I don't mind it loading other urls at file://?
I don't know if disabling security features for cosmetic fixes is a good idea. I'm not a web dev, but I'm given to understand this is the mechanism used to prevent pages from being able to exfiltrate data off your local filesystem.
If the appearance without those fonts is intolerable, you could install the fonts being used. I believe I have them installed, and I don't get any errors.
I mean that the browser could enforce that all requests go through the file:// protocol, so this would be rejected because it uses the http:// protocol.
I was more thinking out loud than actually having any knowledge on the subject.
I've got the source code pro, and fira sans fonts installed, but firefox doesn't find them. I might see if rebooting my system helps - maybe firefox caches fc-list or something.
edit I guess this is a bit OT for rust, but it's something that's always been a little niggle. Even now, firefox isn't finding my ttf/otf fonts for Fira Sans (I have installed both).
edit 2
This is what I see - it really looks like the alignment is still off. I have installed all the fonts I need and rebooted, but firefox is still not finding them. fc-match "Fira Sans:Regular" works. I'm not sure what to do.