epubcheck icon indicating copy to clipboard operation
epubcheck copied to clipboard

Flag SVG fonts as exempt foreign resources

Open mattgarrish opened this issue 6 months ago • 1 comments

While looking at adding the non-preferred media type application/x-font-ttf for TrueType fonts, I noticed that SVG fonts are considered blessed fonts. That despite their not being listed in the core media type table or required to be supported by reading systems.

After some digging through old history in https://github.com/w3c/epub-specs/issues/2729 , it appears that we let SVG fonts slide through as core media types and the cascade would handle fallbacks for reading systems that don't support them, an early taste of what we opted to do for all fonts many years later.

All that to say, we should probably flag SVG fonts as exempt foreign resources -- if it's not too problematic to differentiate them from content documents?

It won't change that they're allowed without fallbacks, but it'd be more in line with how the specification treats them. And if, as Brady points out in that issue, support for them is nearly dead, some message might be better than nothing.

mattgarrish avatar May 30 '25 20:05 mattgarrish

Actually, maybe this is a non-issue. The ability to add fonts has been removed in SVG 2, so presumably anyone who used them in the past is already going to fail validation if they try to republish/revalidate their content.

It might be a good cleanup task to take them out of the list of core font media types, but I'm fine if you just want to close this off with no action.

mattgarrish avatar May 31 '25 13:05 mattgarrish