GNOME Bugzilla – Bug 675348
line number gutter is clipped for large fonts
Last modified: 2013-05-19 18:11:03 UTC
Initial test setup: 1. Select the |Edit > Preferences| menu 2. Select the |View| tab 3. Enable the |Display line numbers| option 4. Select the |Fonts & Colours| tab 5. Change the |Editor font:| option to the font specified in the test case (see below) 6. Press the |Close| button 7. Open test file A with at least more than one line 8. Go to the end of the file Steps to reproduce: 1. Select the |Edit > Preferences| menu 2. Select the |Fonts & Colours| tab 3. Change the |Editor font:| option to the font specified in the test case (see the TEST CASE items below) 4. Press the |Close| button 5. Note the rendering of the line gutter on file A at the end of the files (see the OBSERVATION items below) 6. Open test file B with at least more than one line 7. Go to the end of the file 8. Note the rendering of the line gutter on file A and B at the end of the files (see the OBSERVATION items below) 9. Close test file B TEST CASE #1: Run the test using the [Liberation Mono |10] font OBSERVATION #1A: The file A line number gutter has spacing either side of the numbers (EXPECTED BEHAVIOUR). OBSERVATION #1B: The file B line number gutter has spacing either side of the numbers (EXPECTED BEHAVIOUR). TEST CASE #2: Run the test using the [Liberation Mono |12] font OBSERVATION #2A: The file A line number gutter has spacing on the right hand side of the numbers, but is clipped on the left hand edge (clipping varies depending on the number of characters shown in the gutter). OBSERVATION #2B: The file B line number gutter has spacing either side of the numbers (EXPECTED BEHAVIOUR). TEST CASE #3: Run the test using the [Liberation Mono |18] font OBSERVATION #3A: The file A line number gutter has spacing on the right hand side of the numbers, but is clipped on the left hand edge (clipping varies depending on the number of characters shown in the gutter). The clipping is more noticeable here. OBSERVATION #3B: The file B line number gutter has spacing either side of the numbers (EXPECTED BEHAVIOUR). CONCLUSION: Changing font size on an open file clips the font on the left hand edge. This should not happen -- the gutter should be correctly calculated based on |font-size(max line chars)| + left padding + right padding. It looks like the gutter is calculated based on the font size when the file was initially opened (compare the results between file A and B).
*** Bug 669672 has been marked as a duplicate of this bug. ***
Attachment #227875 [details] is clearer. *** This bug has been marked as a duplicate of bug 687415 ***