Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] Re: (PR#1328) [patch] "turns-to-grow" on the map overview
Home

[Freeciv-Dev] Re: (PR#1328) [patch] "turns-to-grow" on the map overview

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#1328) [patch] "turns-to-grow" on the map overview
From: "Raimar Falke via RT" <rt@xxxxxxxxxxxxxx>
Date: Mon, 18 Nov 2002 15:51:58 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Mon, Nov 18, 2002 at 01:40:23PM -0800, Jason Short via RT wrote:
> 
> [vasc@xxxxxxxxxxxxxx - Sun Nov 17 22:43:18 2002]:
> 
> > The GTK+ font code at least has issues. You should use the string extents
> > function instead of checking the font data directly. Not all languages are
> > the same. What works for the Latin alphabet may not work elsewhere and
> > this is why the string extents functions exist in the first place.
> 
> My mistake.  I don't know why I dropped that originally!
> 
> This patch corrects that (for gui-gtk; others should be fine).  I've
> also fixed some whitespace style issues.  And I've added GTK2 support,
> including color support.
> 
> There is one other thing that is bad.  The mapview_common code inserts
> an extra space on the end of the city name if the turns-to-grow is also
> to be shown.  Originally this was a hack done on a per-GUI basis to get
> the spacing to come out right.  But it's really not correct.  For one
> thing, gui-gtk-2.0 (on my machine!) uses a different ("better") font in
> which one space is simply not wide enough.  And doing this in
> mapview_common will conflict with a GUI that tries to use a civ3-like
> layout for the display of this information (although in that case the
> productions texts will have to be updated as well...).  I have "fixed"
> this by moving the hack into the GUI code: introducing a fixed-width
> separation between the city name and growth strings.  It is still a
> hack, but at least now it's local (and labeled).  Vasco, how should this
> actually be done?  It would be possible to at least make the separation
> font-dependent by using the width of an actual string instead of
> hard-coding it, but this may be locale-dependent.

I think that the width of "M" is a good idea. It is even a width in
latex.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  One nuclear bomb can ruin your whole day.



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