Re: Imprecise font scaling

Werner LEMBERG <[email protected]>
Newsgroups gmane.comp.gnu.lilypond.bugs
Message-ID <[email protected]>
>> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.