Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Andrew Bernard

https://www.wikihow.com/Reduce-PDF-File-Size

Was compressed to zero bytes. :-)


On 18/03/2023 5:58 pm, Werner LEMBERG wrote:


Link missing?





Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Volodymyr Prokopyuk
Good morning Jean and Werner,

The alpha transparency and fonts embedded in SVG along with leaner code are
important advantages of Cairo. Thank you for outlining this!

I'll investigate ways to reduce PDF size and let you know the outcomes of
my investigation.

Thank you,
Vlad

On Sat, Mar 18, 2023 at 6:08 AM Werner LEMBERG  wrote:

>
> > I can see that the size of the Cairo-generated PDF is around 3 times
> > bigger compared to the same document generated with Ghostscript?  Is
> > there is way to reduce the size of the Cairo-generated PDF?
>
> You might try `pdfsizeopt`.
>
>   https://github.com/pts/pdfsizeopt
>
>
>  Werner
>


Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Paul Hodges

From:   Andrew Bernard  

In this day of gigabyte this an terabyte that, does a large PDF matter  
very much? What is the issue of concern?

Unnecessary waste of resources is always a poor idea, especially if it is 
unexplained.



My concern is more wondering that if the ordinary PDF is of the required 
quality (defined how?), what is being changed to increase its size so much?  
And if an unexplained change is being which is so visible to us, what changes 
might be happening that we haven't noticed.


Paul

Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Volodymyr Prokopyuk
Hello,

I've tried the https://github.com/pdfcpu/pdfcpu with very good results:

   - Lilypond with Ghostscript x1.5 => 5.3 MB PDF v1.5
   - Lilypond with Cairo x4 => 15.0 MB PDF v1.5
   - Lilypond with Cairo + pdfcpu x1 => 3.6 MB PDF v1.7

PDF outlines, hyperlinks and overall document appearance is apparently not
altered after the optimization with the pdfcpu.

The pdfsizeopt has several external dependencies and claims to be slow, so
I have not tried it as I'm happy with the above solution which is easy to
install and runs fast.

Thank you,
Vlad

On Sat, Mar 18, 2023 at 9:19 AM Volodymyr Prokopyuk <
volodymyrprokop...@gmail.com> wrote:

> Good morning Jean and Werner,
>
> The alpha transparency and fonts embedded in SVG along with leaner code
> are important advantages of Cairo. Thank you for outlining this!
>
> I'll investigate ways to reduce PDF size and let you know the outcomes of
> my investigation.
>
> Thank you,
> Vlad
>
> On Sat, Mar 18, 2023 at 6:08 AM Werner LEMBERG  wrote:
>
>>
>> > I can see that the size of the Cairo-generated PDF is around 3 times
>> > bigger compared to the same document generated with Ghostscript?  Is
>> > there is way to reduce the size of the Cairo-generated PDF?
>>
>> You might try `pdfsizeopt`.
>>
>>   https://github.com/pts/pdfsizeopt
>>
>>
>>  Werner
>>
>


Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Andrew Bernard
I don't have any quantitative data but I image turning off the embedding 
of the source code would reduce file size in the PDF which may help.


Andrew


On 18/03/2023 10:38 pm, Volodymyr Prokopyuk wrote:

I've tried the https://github.com/pdfcpu/pdfcpu with very good results:




Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Andrew Bernard
Hi Werner, With NBN in Australia, the speeds are amazing. I have a 
'modest' plan at 100Mbps nominal but I get consistently 10 percent plus 
higher. And a _lot_ of people are now moving to the commonly available 
1000Mbs plans, at quite reasonable cost. So for we Aussies down under, 
big PDF's hardly matter in terms of network bandwidth. I have no idea 
what the situation is in Europe or America. The National Broadband 
Network is a government initiative.


Everything gets fatter with time. Including me.

Sure it would be great to have slim PDF's but that does not seem to be 
the trend.


Andrew


On 18/03/2023 5:58 pm, Werner LEMBERG wrote:

In this day of gigabyte this an terabyte that, does a large PDF

matter very much?

IMHO yes.  Today, PDF files are loaded *and* displayed in a browser.
The larger the file, the longer it takes until it gets displayed.
Additionally, an optimized PDF gets (normally) processed faster, which
is thus also of benefit.


 Werner




Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Werner LEMBERG


> Hi Werner, With NBN in Australia, the speeds are amazing.  [...]

Well, a great percentage of the world does not have such amazing
circumstances...


Werner



Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread kieren

Hi Andrew,

In this day of gigabyte this an terabyte that, does a large PDF matter 
very much? What is the issue of concern?


1. For transferring/emailing, smaller is better for a number of reasons.

2. For those of us (e.g., Music Directors) who store and use multiple 
PDFs of complete musicals or operas (and, in the case of workshops, the 
associated scripts/libretti) on an iPad, the size of each PDF can make a 
huge difference, both in terms of the storage requirements and the 
responsiveness within the workflow.


Hope that helps clarify!
Kieren.



Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Jean Abou Samra
Le samedi 18 mars 2023 à 23:19 +1100, Andrew Bernard a écrit :
> I don't have any quantitative data but I image turning off the embedding  
> of the source code would reduce file size in the PDF which may help.

`-dembed-source-code` is off by default.


signature.asc
Description: This is a digitally signed message part


Re: autoChange creating extra staff

2023-03-18 Thread Jean Abou Samra
Le vendredi 17 mars 2023 à 17:06 -0700, Alexandre Loomis a écrit :
> That works perfectly, thanks! Follow up question, is there a way to change 
> the cross-over point during the music, or do I need to do something like  
> \CrossStaff = {  
>     \autoChange c' { *music* }  
>     \autoChange f' { *music* }  
> }


No, this is the way.


signature.asc
Description: This is a digitally signed message part


Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread David Kastrup
Paul Hodges  writes:

> From:   Andrew Bernard  
>
> In this day of gigabyte this an terabyte that, does a large PDF matter  
> very much? What is the issue of concern?
>
> Unnecessary waste of resources is always a poor idea, especially if it
> is unexplained.
>
>
>
> My concern is more wondering that if the ordinary PDF is of the
> required quality (defined how?), what is being changed to increase its
> size so much?

Different mostly redundant font subsets for thousands of images add up.

-- 
David Kastrup



Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Jean Abou Samra



> Le 18 mars 2023 à 16:58, David Kastrup  a écrit :
> 
> Different mostly redundant font subsets for thousands of images add up.


That is the problem that appears for LilyPond’s documentation PDFs, which embed 
lots of examples. We are talking about standalone scores here, not 
documentation.





Alternate Measures

2023-03-18 Thread Greg Lindstrom
Hello,

I am reworking the bass (tuba) parts for my section in the Natural State
Brass Band. For those of you not familiar with the British-style Brass
band, ALL members of the band are expected to have exceptional technique.
The piece I'm reworking has 32nd note runs (1/4 = 90) which members of my
section just can't play, so I'm writing "simplified" versions which either
play every other note or a small (3 or 4 note) snippet. When all 3 parts
are played together the entine lick is covered.

So, my question. Is there a way I can set something at the top of the file
where I can specify which version of the measure(s) I want engraved?  For
example, suppose I have a "variable" called "part_name" which I can set to
"full" or "simple". I am looking for something like this:

a4 b c d| # We all play this
if (part_name == "full" Then
a8 a b b c c d d| # this measure for our advanced
players
else
a4 b c d| # this measure of our
"junior" players
end
a4 b c d  # we're all back to playing
together again

I'm currently using "ossia" notation, but it's cluttering the part up,
though it's nice to see what others are doing.

Is there anything I can do short of having 2 copies of the parts differing
only by the few measures I've changed?

Thanks Everyone!

--greg


Re: Alternate Measures

2023-03-18 Thread kieren

Hi Greg,

Is there a way I can set something at the top of the file where I can 
specify which version of the measure(s) I want engraved?


Look for \tag, and you'll find exactly what you want!

Hope that helps,
Kieren.



Re: Alternate Measures

2023-03-18 Thread Greg Lindstrom
Kieren,

My Original Question:
>> Is there a way I can set something at the top of the file where I can
>> specify which version of the measure(s) I want engraved?

Kieren's Response:
>Look for \tag, and you'll find exactly what you want!

My reaction:
Bingo, Bango, Bongo!!  This is EXACTLY what I'm looking for and it works
like a champ. I can now arrange custom parts for my section based on the
technical ability of my players.

Thanks. And THANKS to the developers for thinking of this and coding it up.

--greg

On Sat, Mar 18, 2023 at 3:38 PM  wrote:

> Hi Greg,
>
> > Is there a way I can set something at the top of the file where I can
> > specify which version of the measure(s) I want engraved?
>
> Look for \tag, and you'll find exactly what you want!
>
> Hope that helps,
> Kieren.
>


oddHeaderMarkup

2023-03-18 Thread Dimitri Sykias
Lilypond v. “2.24.1”. I use “oddHeaderMarkup” and “evenHeaderMarkup”. I want to 
change the font size of header, but “\fontsize #-1.0” does nothing. How can I 
achieve this? Thanks!

oddHeaderMarkup = \markup
  \fill-line {
" " 
\on-the-fly #part-not-first-page \fontsize #-1.0 \fromproperty 
#'header:subtitle
\if \should-print-page-number \fromproperty #'page:page-number-string
  }
  evenHeaderMarkup = \markup
  \fill-line { 
\if \should-print-page-number \fromproperty #'page:page-number-string
\on-the-fly #part-not-first-page \fontsize #-1.0 \fromproperty 
#'header:subtitle
" "
  }


Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Andrew Bernard
It's kinda sorta on by default in Frescobaldi. engrave -preview is 
Ctrl-M and engrave - publish -Ctrl-Shift-P. And the engrave icon, when 
you press it, without going through the dropdowns, is preview by default.



|-dembed-source-code| is off by default.


Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Andrew Bernard

Well as I said, I don't know. I thought America would be way ahead.


On 18/03/2023 11:44 pm, Werner LEMBERG wrote:

Hi Werner, With NBN in Australia, the speeds are amazing.  [...]

Well, a great percentage of the world does not have such amazing
circumstances...


 Werner




coloring edits

2023-03-18 Thread Mark Stephen Mrotek
Hello,

 

The documentation has examples of coloring note heads, stems, and staves.

Where would I look for instructions to color slurs and/or ties?

 

Thank you.

 

Mark



Re: coloring edits

2023-03-18 Thread William Rehwinkel

Dear Mark,

Once you know how to apply colors to things like noteheads, applying 
that to the rest of the symbols is not difficult. It's just a matter of 
knowing the internal name (such as Slur, Tie, etc.). These can be found 
by looking up the symbols in the internals reference. For example, the 
following link 
https://lilypond.org/doc/v2.24/Documentation/internals/phrasingslur


For one more example, to change the color of a slur, you simply have to do

\version "2.24.1"

\relative c' {
  c4( d e f)
  \override Slur.color = #red
  c4( d e f)
}

Thanks,
-Will

On 3/18/23 22:42, Mark Stephen Mrotek wrote:

Hello,

The documentation has examples of coloring note heads, stems, and staves.

Where would I look for instructions to color slurs and/or ties?

Thank you.

Mark



--
+ -- +
|William Rehwinkel - Oberlin College and |
|   Conservatory '24 |
|  will...@williamrehwinkel.net  |
| PGP key:   |
| https://williamrehwinkel.net/static/pubkey.txt |
+ -- +


OpenPGP_signature
Description: OpenPGP digital signature