[Top][All Lists]

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

Re: [Maposmatic-dev] [PATCH] [ocitysmap] Rescale category header where n

From: Thomas Petazzoni
Subject: Re: [Maposmatic-dev] [PATCH] [ocitysmap] Rescale category header where needed
Date: Tue, 17 Apr 2012 09:58:17 +0200

Hello Jeroen,

Thanks a lot for contributing this. It's really nice to see that people
outside of the original MapOSMatic core team are contributing code.

Le Tue, 17 Apr 2012 03:18:17 +0200,
Jeroen van Rijn <address@hidden> a écrit :

> +        # Measure header text and rescale if needed
> +
> +        # Tell Pango to not wrap text
> +        layout.set_width(-1)

Why? If I understand correctly, you want each category title to fit
without being wrapped. Is this really what we want to do?

Another question is that, if I'm not mistaken, you are doing this font
size adaptation algorithm on a per-category title basis, which means
that depending on their length, each title might have a different font
size, which is not really pretty.

I think I would prefer a scheme where you first travel through all
category titles, compute the maximum length, and then the adequate font
size, which you then use to render all category titles.

What do you think about this?

Best regards,

Thomas Petazzoni      
Logiciels Libres à Toulouse
Embedded Linux        

reply via email to

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