The generic font family, "serif", is not the default font (defaulting to monospace) for HTML in a <foreignObject>, and is also not able to be used manually with font-family: serif;
The font size keyword, medium, is also not the default font size (defaulting to 1px), also has no effect when used manually. None of the other font size keywords (xx-/x-/small, medium, xx-/x-/large) work when used manually either.
This behavior breaks my DOM screenshot library, which puts DOM nodes into an SVG and then loads the SVG in an image and draws it to canvas.
Could you please attach a test case?
See also: bug 68090, bug 87069.
*** Bug 87069 has been marked as a duplicate of this bug. ***
Here's a small test that should show sans-serif text.
I'll put it here, so it doesn't break the layout of Bugzilla:
(Sigh, that of course broke the layout anyway and made all the comments really wide. Sorry!)
Created attachment 143422 [details]
Threw together a quick testcase from dom2canvas code. If you don't see anything, your browser fails the testcase.
Created attachment 143424 [details]
Firefox had an issue with <script>-in-<img>