Skip Menu |

This queue is for tickets about the Image-ExifTool CPAN distribution.

Report information
The Basics
Id: 115176
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: Image-ExifTool

People
Owner: Nobody in particular
Requestors: sunnycemetery [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 10.20



Subject: Double-Width Alignment Issue
Date: Thu, 9 Jun 2016 01:07:58 -0400
To: bug-Image-ExifTool [...] rt.cpan.org
From: Grady Martin <sunnycemetery [...] gmail.com>
Hello, and thank you for exiftool. It makes file managing on the command line more fun. The attached screenshot attempts to demonstrate an issue that I discovered after running exiftool with "-lang ja". It seems that character count (and not character width) is used to calculate column padding. Do you suppose this issue might be addressed at some point in the future? System information (in order of request): Linux version 4.5.4-1-ARCH (builduser@tobias) (gcc version 6.1.1 20160501 (GCC) ) #1 SMP PREEMPT Wed May 11 22:21:28 CEST 2016 Linux slim 4.5.4-1-ARCH #1 SMP PREEMPT Wed May 11 22:21:28 CEST 2016 x86_64 GNU/Linux This is perl 5, version 24, subversion 0 (v5.24.0) built for x86_64-linux-thread-multi Thank you and take care.

Message body is not shown because sender requested not to inline it.

Thanks for this report, however I don't think it is possible to do what you request since the character width is dependent on the font used, and ExifTool has no way to determine what this is (as far as I know). - Phil
CC: sunnycemetery [...] gmail.com
Subject: Re: [rt.cpan.org #115176] Double-Width Alignment Issue
Date: Thu, 9 Jun 2016 14:51:00 -0400
To: Phil Harvey via RT <bug-Image-ExifTool [...] rt.cpan.org>
From: Grady Martin <sunnycemetery [...] gmail.com>
Thank you for the prompt response! Character width is a Unicode property. I measure a string's width in Python with the attached code. For a proof of concept (non-Python, I presume), try $( LANG=ja_JP.utf8 cal -y ). If Perl has a Unicode module, columnar alignment should be possible. I apologize for my lack of Perl knowledge... If I had some, I would have included a patch! On 2016年06月09日 09時57分, Phil Harvey via RT wrote: Show quoted text
> ><URL: https://rt.cpan.org/Ticket/Display.html?id=115176 > > >Thanks for this report, however I don't think it is possible to do what you request since the character width is dependent on the font used, and ExifTool has no way to determine what this is (as far as I know). > >- Phil
Thanks, you have taught me something. Perl has a Unicode::GCString module that does just this. I will add support for this in ExifTool 10.20. Beware though that this will require that you install Unicode::GCString because it isn't part of the standard distribution. Also beware that it requires installation of a number of dependencies. - Phil
CC: sunnycemetery [...] gmail.com
Subject: Re: [rt.cpan.org #115176] Resolved: Double-Width Alignment Issue
Date: Tue, 14 Jun 2016 12:46:43 -0400
To: Phil Harvey via RT <bug-Image-ExifTool [...] rt.cpan.org>
From: Grady Martin <sunnycemetery [...] gmail.com>
That was much sooner than I expected. Thank you! I ran a system update and installed Unicode::GCString this morning, and suddenly exiftool previews in ranger were beautifully aligned. I did notice, however, that column width seems to be calculated according to the widest string in the original English, not the widest string overall... perhaps. Please see the attached screenshot. Incidentally, I would be happy to fill in some Japanese translation holes. Please point me in the right direction. On 2016年06月14日 08時47分, Phil Harvey via RT wrote: Show quoted text
> ><URL: https://rt.cpan.org/Ticket/Display.html?id=115176 > > >According to our records, your request has been resolved. If you have any >further questions or concerns, please respond to this message.

Message body is not shown because sender requested not to inline it.

The width is fixed, and not calculated based on the widest string, so long strings cause a misalignment, but this is the same in English. The official way to add translations is to use the -listx option to list all the tags (for one group if you want) and add the missing translations, but there is a lot of duplication in the maker notes if this is what you want to do. Maybe it is easiest if you just send me the English descriptions and their translations and I'll add them myself. My email is phil at owl.phy.queensu.ca - Phil