epub validator and SVG webfonts bug
Hi all!
When I do perform epub validation (using 3.0.1) I get an error that points to SVG fonts embeded:
ERROR: wl_14_na_gr9-12_sp_se_l1_u01_9780547901541.epub/OPS/css/template.css(4,1): 'f0dd20a3-6eac-4bdf-8964-3cf614f3f798': fragment identifier is not defined in 'OPS/fonts/global/f0dd20a3-6eac-4bdf-8964-3cf614f3f798.svg'
which reffers to the CSS on webfonts
src:url("../fonts/global/f0dd20a3-6eac-4bdf-8964-3cf614f3f798.svg#f0dd20a3-6eac-4bdf-8964-3cf614f3f798") format("svg");
(I trimmed other font types above, as they are not the scope of problem)
So the problem is the value which is after hash (#) symbol, which refers to the attribute in SVG font file. That is required value to make SVG fonts working.
reference: http://stackoverflow.com/questions/12466540/is-the-hash-necessary-in-svg-font-face-declarations
So looks we have a conflict of epub validator against proper CSS syntax for SVG fonts.
Any suggestions? Would be grateful.
Hi, would you have a sample file so that we can easily reproduce this error ? Thanks!
Hi, you can download the epub file from here:
getwhatyalike.com/epub-svg-bug/svg-validation-bug.epub
validated with epubcheck-3.0.1
thanks Zee
Please remove "#f0dd20a3-6eac-4bdf-8964-3cf614f3f798" id from css source code.
@ashutosh1290 The # identifier is required for SVG fonts as per http://www.electrictoolbox.com/download-embed-fonts-font-face/ "With SVG fonts, they also need a #hashtag" and http://stackoverflow.com/questions/12561079/font-face-completely-bugging ""This is there because you can actually have multiple fonts embedded within the same SVG file, and you need to specify which one you want to use." therefore the "#f0dd20a3-6eac-4bdf-8964-3cf614f3f798" id cannot be removed from the css source code
This bug occurs selectively, and it would be great to get an answer. Why do some strings work, but others do not (such as @ethanhines UUIDs)?
Tentatively adding to 4.2.0-RC, as we'll try to fix the handling of SVG fonts.
I think this has been fixed in #995.