[PATCH] Change default MacOS font

Dirk Hohndel dirk at hohndel.org
Tue Feb 5 12:07:39 PST 2013


"Robert C. Helling" <helling at atdotde.de> writes:

> On Feb 4, 2013, at 10:23 PM, Robert C. Helling wrote:
>
>> 
>> On Feb 4, 2013, at 11:35 AM, Robert C. Helling wrote:
>> 
>> 
>> On the printing issue: It's really the size. In print.c, in set_font, if I manually divide the size parameter by a number around 20.0, it looks ok-ish. Without the number, there the second argument to pango_font_description_set_size is set to values like
>> 
>> Setting font size to 153.600000
>> Setting font size to 128.000000
>> Setting font size to 153.600000
>> Setting font size to 106.666667
>> Setting font size to 106.666667
>> Setting font size to 106.666667
>> Setting font size to 106.666667
>> Setting font size to 106.666667
>> Setting font size to 106.666667
>> Setting font size to 106.666667
>> Setting font size to 106.666667
>> 
>> as a printf shows. I don't know if those numbers are ok and the outcome is too big or if those numbers are too big. A hack to fix this would of course be to multiply here by a fudge factor of about 0.05 if running on a Mac…
>> 
>
> I checked, these number are the same on my Linux box, but there the printout is ok. It seems to me Cairo/Pango somehow does not realize that on the Mac, all printers have a virtual resolution of 1200DPI. I googled a bit but could not find anybody else having a similar problem or even a solution. Thus I would suggest (unless somebody has a better understanding what is going on with Cairo font sizes on different platforms and devices (screen is ok, so are the fonts in the plot, just not the text in the boxes below) to include a fudge factor in pango_font_description_set_size that is nontrivial (about 1/20 = 0.05) only on Macs.

That seems like a way to deal with it. But the thing that bothers me
about it is this:

early on in Subsurface's development, soon after I did the initial Mac
port I /know/ that I printed a logbook for a trip from my Mac. And it
was fine. So I'm puzzlied and curious what changed since then that
causes the build to break.

I know that git bisect is painful with the changes in infrastructure
(osx integration and libdivecomputer), but I really want to understand
what happened. I may spend the time to do this when I'm back home.

For now if you can send a patch the Henrik can test, that would be
great.

/D


More information about the subsurface mailing list