Tk Source Code

View Ticket
Login
Ticket UUID: 1f46cac080dc5ab8b4739ed64bcbb3d293647091
Title: ::tk::fontchooser contains a couple of issues
Type: Bug Version: 8.6.10
Submitter: anonymous Created on: 2020-07-12 11:59:39
Subsystem: 46. Unix Fonts Assigned To: jan.nijtmans
Priority: 5 Medium Severity: Minor
Status: Pending Last Modified: 2020-07-12 15:25:40
Resolution: Fixed Closed By: nobody
    Closed on:
Description:
The following issues exists in ::tk::fontchooser 8.6.10 and earlier.

Two are found by the creator of Ticket UUID: 2442314:

- The Tcl implementation of fontchooser does not use the message catalog to display font styles.

- Furthermore the label for the Font size uses the same width as the listbox that contains the numbers of the font sizes. This may not be wide enough for some languages like German for example.

Found by me:

- The locale of the style is set when fontchooser.tcl is sourced. Therefore, a locale change afterwards will not change the displayed style. All other strings use a changed locale when the dialog is new created.

- The default value of style is not translated into the used locale. If the selected locale use different strings for the styles, you can't use the 'Ok' button but the 'Apply' button.

- The provided font does not contain the style attributes in case of a locale like de. Reason is that the value is not translated back to the way Tk use it.
User Comments: jan.nijtmans added on 2020-07-12 15:25:40:

Proposed fix committed to its own branch. Spotted one missing msgcat call, but other than that looks good.

The fix for [2442314] is committed directly to core-8-6-branch, since it's a subset from your changes, and this way the original author will get his credit for his changes in the 8.6.11 release notes. You will get credit for your changes there.

Thanks!


Attachments: