… | |
… | |
185 | |
185 | |
186 | static void |
186 | static void |
187 | layout_update_font (DC__Layout self) |
187 | layout_update_font (DC__Layout self) |
188 | { |
188 | { |
189 | /* use a random scale factor to account for unknown descenders, 0.8 works |
189 | /* use a random scale factor to account for unknown descenders, 0.8 works |
190 | * reasonably well with bitstream vera |
190 | * reasonably well with dejavu/bistream fonts |
191 | */ |
191 | */ |
192 | PangoFontDescription *font = self->font ? self->font : default_font; |
192 | PangoFontDescription *font = self->font ? self->font : default_font; |
193 | |
193 | |
194 | pango_font_description_set_absolute_size (font, |
194 | pango_font_description_set_absolute_size (font, |
195 | MAX (MIN_FONT_HEIGHT, self->base_height) * (PANGO_SCALE * 8 / 10)); |
195 | MAX (MIN_FONT_HEIGHT, self->base_height) * (PANGO_SCALE * 8 / 10)); |