[PATCH] Print.c : fixes problem with line height in print_tanks

Lubomir I. Ivanov neolit123 at gmail.com
Sat Feb 23 06:41:11 PST 2013


On 23 February 2013 11:44, Salvador Cuñat <salvador.cunat at gmail.com> wrote:
> On Mon, Feb 11, 2013 at 08:55:41PM +0100, Salvador Cuñat wrote:
>>
>> In my code I had to introduce a divisor to logic_ext.height because the
>> values we got were too big,  but in yours it was unnecesary and
>> performed very well.  While preparing modifications to the table print I
>> didn't have to introduce the divisor too ...  So  What's the diference ?
>>
> The question would be:   Which is the human limit for stupidity ? or How
> blind can be a person ?
>
> The whole problem was a simple "\n" at the end of the gas_consumed
> string which was the layout sized by pango_layout_get_extents().
>
>> Now Lubomir reports that the divisor makes the lines overlap in win, but
>> not in ubuntu or debian.
>> Any idea ?
>>
> May be because "\n" doesn't work in win ?
>
> Attached is a patch which solves my own stupidity and take account of
> the bigger height used by the strings involved in print_tanks().
>
> Would need test on win.
>
> Sorry for being too late for 3.0
>

re: win32

since we are using glib/gtk as a layer over the windows api "\n",
should work fine.
the native c api (and widgets) on the other hand requires "\r\n".

with the patch i still get a:
"Warning: commit message does not conform to UTF-8.
You may want to amend it after fixing the message, or set the config
variable i18n.commitencoding to the encoding your project uses."

it seems your patch is DOS/ANSI instead of UNIX/UTF-8. could you
configure your commit message editor to conform with that?

---------------

here is the 6x layout print:
http://i46.tinypic.com/rjmqvk.gif
the line spacing between tanks looks fixed now, nice work.

here is the table print:
http://i45.tinypic.com/2lw61xw.gif
there seem to be doubling of the column titles, also the padding
bellow them is incorrect. my locale is (bg_BG).

i could be wrong, but i think the "doubling" happened after dirk made
some changes somewhere in these patches:
07c5cb882f55
f0ff972d91a6b
ce802ffdfc81a

same does not happen on ubuntu 12.04 with an en_US local.

lubomir
--


More information about the subsurface mailing list