[Top][All Lists]

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

[Lilypond-auto] [LilyIssues-auto] [testlilyissues:issues] #5136 font siz

From: Auto mailings of changes to Lily Issues
Subject: [Lilypond-auto] [LilyIssues-auto] [testlilyissues:issues] #5136 font size rendering affected by fontconfig DPI setting
Date: Thu, 11 May 2017 07:48:39 +0000

[issues:#5136] font size rendering affected by fontconfig DPI setting

Status: Accepted
Created: Thu May 11, 2017 07:48 AM UTC by Federico Bruni
Last Updated: Thu May 11, 2017 07:48 AM UTC
Owner: nobody


I ran into an issue with font rendering in Lilypond where text characters
are far too large. This issue also affected several other users and is
described here

It turns out that if the dpi setting is manually set in the fontconfig
fonts.conf file, Lilypond will adopt that dpi setting (rather than the
standard setting used in Lilypond, which is 1200) and render all text too

The desktop environment LXQT sets this to 96 dpi automatically, which is
what triggered the bug for me. This may not a good idea on their part, but
I imagine some users may want to or need to adjust this setting and it
doesn't seem right that this should affect rendering in Lilypond.

To reproduce this bug, edit the following file (or create the file, if it
doesn't exist):

Paste this as the contents of the file (or just add the <match> block with
the dpi setting):

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
  <match target="pattern">
    <edit name="dpi" mode="assign">

Next, compile any .ly file that includes text, for example:

\version "2.19.49"
\header {
  title = "Title"
\relative c''{

I also have a proposed patch that fixes the problem described, although I
don't know if this is the proper way to fix it:

--- lilypond-2.19.49.orig/lily/ 2016-10-16 07:16:18.000000000
+++ 2016-10-29 22:39:02.921622080
@@ -317,7 +317,7 @@
   pango_fc_font_unlock_face (fcfont);
   pango_glyph_string_free (pgs);
   pgs = 0;
-  PangoFontDescription *descr = pango_font_describe (pa->font);
+  PangoFontDescription *descr = pango_context_get_font_description
   Real size = pango_font_description_get_size (descr)
               / (Real (PANGO_SCALE));

I also created a minimal Pango example that reproduces the bug here

Tim Schellenberg

Werner commented:

I think it's a lilypond bug, since setting a DPI value is for stuff
that goes to the screen and/or a selected printer, but lilypond should
produce stuff that does not depend on the DPI.

Sent from because address@hidden is subscribed to

To unsubscribe from further messages, a project admin can change settings at Or, if this is a mailing list, you can unsubscribe from the mailing list.

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
Testlilyissues-auto mailing list

reply via email to

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