[Freeciv-Dev] [bug #17289] Fixed-width tables look bad with wide characters

2012-06-29 Thread Jacob Nevins
Follow-up Comment #1, bug #17289 (project freeciv):

This would be a lot easier if we could assume the internal character set was
UTF-8. Cf patch #3027.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #17289] Fixed-width tables look bad with wide characters

2010-12-10 Thread Jacob Nevins

Additional Item Attachment, bug #17289 (project freeciv):

File name: S2_3-ja_JP-alignment.png   Size:245 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #17289] Fixed-width tables look bad with wide characters

2010-12-10 Thread Jacob Nevins

URL:
  

 Summary: Fixed-width tables look bad with wide characters
 Project: Freeciv
Submitted by: jtn
Submitted on: Fri Dec 10 20:05:34 2010
Category: client
Severity: 2 - Minor
Priority: 3 - Low
  Status: Confirmed
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

Follow-on to bug #17215 and bug #17246:

There are a few places where tables of data are displayed in a fixed-width
typeface, relying on spacing for alignment, in a way that translators have no
control over.

When "wide" characters are used (as in the Japanese localisation, for
instance), the alignment is off.

This is due to use of get_internal_string_length() as a proxy for screen
width. This counts the number of characters (rather than bytes), which is fine
for single-width characters, but it does not take character width into
account.

To fix this we need to use something like wcwidth()
, which
counts the actual number of columns a string takes in a fixed-width font,
based on character properties defined in the Unicode standard. I'm not sure
how widely available it is; perhaps it's a prerequisite of something we
already depend on, although I suspect it's won't be available on Windows at
least. If not we could instead incorporate Markus Kuhn's implementation
.

There may be some hassle integrating it with Freeciv's character set
arrangements, since it works with the native wchar_t.

(Or we could get rid of the need for aligned fixed-width text, but that's
still a chunk of work.)




___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev