Tk Source Code

View Ticket
Login
Ticket UUID: 6386ce66a48d530747763d5fa97d3c96f8584f73
Title: Underscore not displayed in a fixed font
Type: Bug Version: 8.6.5
Submitter: anonymous Created on: 2017-08-21 15:49:31
Subsystem: 44. Generic Fonts Assigned To: nobody
Priority: 5 Medium Severity: Severe
Status: Closed Last Modified: 2017-08-23 07:00:39
Resolution: Invalid Closed By: fvogel
    Closed on: 2017-08-23 07:00:39
Description:
Found under Ubuntu Linux 16.04 LTS.
When using actual fixed font, with size set to 14 pixels (see the code below), underscore is displayed as a space. That is "_" and " " are shown the same way. Other fonts (that have tested) seem to work properly here.

pack [text .text]
.text insert end "asdf_ghjk"
font create text_font
foreach {font_option_name font_option_value} [font actual TkFixedFont] {
    font configure text_font $font_option_name $font_option_value
}
.text configure -font text_font
font configure text_font -size -14
User Comments: fvogel added on 2017-08-23 07:00:39:
Thank you for your feedback. I close this ticket then.

I have subscribed to follow-ups to the ticket you submitted at launchpad. In the event this problem turns out to not be a font bug but rather a font usage bug in Tk (and other applications), the I would reopen this here.

anonymous added on 2017-08-22 23:09:14:

Previously I had only seen this issue at Tcl/Tk applications, but now I have just met this (apparently) DejaVu-Mono-font bug at Geany too, see this bug report. Thus agreeing (as the original submitter for this ticket) that it is not Tcl/Tk issue.

As for why it is seen at text widget, and not at entry widget, I guess that the font glitch may need some circumstances for actual manifestation.
A thing that bothers me is that Ubuntu 16.10 has this issue probably even worse (according to the d4e20ca3dc ticket). I stick with Ubuntu LTS releases, thus do not have 16.10 installed.


fvogel added on 2017-08-22 06:22:32:

I have eventually found the previous ticket on this: [d4e20ca3dc]. This was found to be a font bug, affecting the DejaVu Sans Mono font, which seems to be the only monospaced font that appears to have this problem. Please have a look at the discussion in this other ticket, and confirm the diagnostic if possible.

What puzzles me a bit is that you report (in the attachment) that "Notice that this issue does not occur at "entry" widget; see the attached screenshot where both the "entry" and "text" widgets are configured to use the same font (under Ubuntu 16.04 LTS).". I don't readily understand why the situation could be different for text and entry widgets if the problem is the underlying font.


fvogel added on 2017-08-21 19:43:20:
I'm sure I have seen a bug or discussion on this in the past but I can"t seem to find it.

Happens on Linux (I see it on Debian 8), but not on Windows.

Attachments: