How about hosting the fonts on www.lilypond.org and referencing them in
the @font-face definition?
Johannes
Am 15.02.2021 um 21:06 schrieb Werner LEMBERG:
IMHO, this is as good (or as bad) as a default as 'serif'. If you
want SVG images to be similar to, say, PDF output, you have
* to exactly specify which font you want to use for text, and
* to convert glyphs to paths, for example, by postprocessing
LilyPond's output SVG file with inkscape's `-T` option.
Could we possibly offer the option to embed the fonts inside of the
SVG file [...]
This is a non-trivial issue. It's rather straightforward to embed
fonts into an SVG file using
<style>
@font-face {
font-family: 'foobar';
src: url(data: application/font-woff2;
charset = utf-8;
base64, d09GMgABAAAAAA70AA8AAAAAGF ...)
format('woff2'),
font-weight: normal;
font-style: normal;
}
</style>
The tricky part, however, is font subsetting to make the SVG files
small. IMHO, this is outside of LilyPond's scope.
Another possibility is creating a PDF with LilyPond, then loading it
into inkscape, which can automatically convert all fonts to paths.
This way, you get SVGs that are identical to the PDFs – I think this
is good enough for having scalable images on web pages and the like.
Werner
--
Johannes Feulner
Tel: +49 721 33500158 [email protected]
scorio GmbH Bonhoefferweg 3 76327 Pfinztal
Geschäftsführer Johannes Feulner
Sitz der Gesellschaft Karlsruhe
Amtsgericht Mannheim HRB 713486
_______________________________________________
bug-lilypond mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-lilypond