Error on SVG font files in pre-paginated EPUB rendition
If an EPUB rendition has the rendition:layout set to pre-paginated, SVG font files are getting flagged with this error:
ERROR(HTM-048): test.epub/OEBPS//fonts/webfont.svg(x,xx): SVG ViewBox is missing on fixed format document.
These files should not get validated as SVG content documents.
The spec is a bit ambiguous as to what to do with this. On the one hand, it seems reasonable to expect FXL rules to not apply to an SVG which is only used as a font. On the other hand, the spec associates the SVG media type to SVG Content Documents, and does not list SVG as possible font types (although any font type may be included).
@mattgarrish what's your take on this?
SVG fonts should be exempt from the content document display requirements. They're not content, after all.
If you're inspecting font-face rules, though, can you just omit any svg resources found from the regular validation routines?
I don't believe it's the case that any resource with an image/svg+xml has to be a content document. It's just that any resources with that media type are allowed as content documents. In this case, the context is different, so the validation rules shouldn't apply.
But, you're right that SVG fonts aren't required to be supported, so there's no guarantee they'll be rendered. Their use should be flagged in as a usage message along with any other font types not listed.
I don't believe it's the case that any resource with an image/svg+xml has to be a content document. It's just that any resources with that media type are allowed as content documents. In this case, the context is different, so the validation rules shouldn't apply.
You're right, I just always found the spec a little unclear about that.
If you're inspecting font-face rules, though, can you just omit any svg resources found from the regular validation routines?
Yeah, possibly. It does't seem super straightforward from what I remember however. Maybe we can also base the Content-Doc-validation rules on whether the doc is a spine item or not.
Let's try to tentatively target that in 4.2.0. We'll postpone to a later release if the schedule is too tight.