lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Missing items to make Cairo ready


From: Werner LEMBERG
Subject: Re: Missing items to make Cairo ready
Date: Thu, 05 Jan 2023 13:24:10 +0000 (UTC)

>> The only thing I would like to convince the Cairo people is to add
>> a mode to produce PDFs with font references instead of embedding –
>> and subsetting – fonts.  My Cairo knowledge is zero; maybe this is
>> already possible?
> 
> This makes no sense to me as a Cairo feature. Such PDF snippets
> would need custom post processing to assemble into the full
> document.

The general problem (i.e., the inclusion of multiple PDF images into a
larger PDF document) is not unique to LilyPond.  My idea is that there
exist special tools (for example, Ghostscript's 'pdfwrite' device or
`pdfsizeopt`) to produce size-optimized PDFs.[*] However, these tools
can only do their optimization job if the necessary preliminaries are
fulfilled.  If the PDF images contain subsetted fonts, it doesn't work
most of the time: You either need PDFs with complete fonts (i.e., not
subsetted), or PDFs with references to fonts.  I've now looked up the
Cairo manual, and it doesn't offer any control for that.

> If we do custom post processing, we might as well postprocess the
> final PDF directly to make all snippets point to a single music font
> object?

Font subsetting effectively prevents such post-processing since too
much information gets stripped off during this process.  For the
special case of Emmentaler fonts it might work because LilyPond knows
more about these fonts than for others, but not in the general case.

> IMO, working with a 35mb user manual isn't materially different from
> working with a 10mb user manual.  Both take a while to download.

Indeed, but the manuals as a whole, in all languages, get also
distributed, and there it *does* make a significant difference IMHO:
Right now, the PDFs in `lilypond-2.24.0-documentation.tar.xz` (which
has a size of 170MByte) need 144MByte in total (uncompressed).
Multiply the latter by four...

> also wonder how people actually use the PDF manual. It's very big to
> print out, and compared to the HTML manual, unwieldy to use on
> screen.

In the HTML manual it is not possible to zoom into the images.  While
the resolution of the PNG images is OK in general, there are sometimes
situations where a non-pixel graphics format would be very beneficial.


    Werner


[*] With `pdfsizeopt` you can reduce the current size of the current
    `notation.pdf` from 7.3MByte to 5MByte.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]