bug-lilypond
[Top][All Lists]
Advanced

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

Re: Imprecise font scaling


From: Werner LEMBERG
Subject: Re: Imprecise font scaling
Date: Sat, 10 Feb 2024 21:29:16 +0000 (UTC)

>> However, 2 * 3.86523438 = 7.73046876 != 7.73242188.

> I'm quite sure this is because of
>
>      int pango_size = static_cast<int> (
>         std::lround (static_cast<Real> (requested_size) * PANGO_SCALE));
>
>
> in lily/font-select.cc, which we cannot really do anything about,
> because the Pango API
>
> https://docs.gtk.org/Pango/method.FontDescription.set_size.html
>
> expects an integer size scaled by PANGO_SCALE, which is 1024. That
> is, we are limited to a precision of 1/1024 points on the font size.

Shall we document this somehow?


    Werner

reply via email to

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