Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 346374

Summary: [block selection] specify a Windows Vista font value for org.eclipse.ui.workbench.texteditor.blockSelectionModeFont
Product: [Eclipse Project] Platform Reporter: Michael Pellaton <michael.pellaton>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, dh_tue, markus.kell.r, philippe.marschall
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
side-by-side comparison none

Description Michael Pellaton CLA 2011-05-19 03:23:39 EDT
Build Identifier: I20110512-2000

When toggling between normal and block mode, the font size changes.

This was behaviour was first observed in 3.7M7 and now persists in 3.7RC1.

Win XP and Linux GTK 32 bit are both OK.

Reproducible: Always

Steps to Reproduce:
1. Edit a text file
2. Toggle to/from block mode (Ctrl+Shift+a)
3. See how the font size changes
4. a side by side example will be attached as image
Comment 1 Michael Pellaton CLA 2011-05-19 03:24:17 EDT
Created attachment 196076 [details]
side-by-side comparison
Comment 2 Dani Megert CLA 2011-05-19 03:30:52 EDT
There's a separate 'Text Editor Block Selection Font' for block selection so that one can work with a non-monospace font but have a monospace font when working in block selection mode. Out of the box they are supposed to be the same.
Comment 3 Michael Pellaton CLA 2011-05-19 03:38:51 EDT
(In reply to comment #2)
I have not changed any font (reset disabled). However, the two fonts "text font" and "text editor block selection font" are not the same when in default. Is there an issue with the preference initializer or so?
Comment 4 Philippe Marschall CLA 2011-05-19 03:39:45 EDT
On Windows Vista the defaults I have are:

Text Font: Consolas 10
Text Font Editor Block Selection Font: Courier New 10
Comment 5 Dani Megert CLA 2011-05-19 04:08:49 EDT
(In reply to comment #4)
> On Windows Vista the defaults I have are:
> 
> Text Font: Consolas 10
> Text Font Editor Block Selection Font: Courier New 10

Is Consolas a monospace font?
Comment 6 Michael Pellaton CLA 2011-05-19 04:17:02 EDT
(In reply to comment #5)
> (In reply to comment #4)
> > On Windows Vista the defaults I have are:
> > 
> > Text Font: Consolas 10
> > Text Font Editor Block Selection Font: Courier New 10
> 
> Is Consolas a monospace font?
Yes it is, for details see here:

http://www.microsoft.com/downloads/en/details.aspx?familyid=22e69ae4-7e40-4807-8a86-b3d36fab68d3&displaylang=en
Comment 7 Dani Megert CLA 2011-05-19 04:26:17 EDT
OK, if that's a monospace font then we should also use it for the block selection font.
Comment 8 Michael Pellaton CLA 2011-07-27 14:36:33 EDT
I am willing to try to fix the issue and provide a patch. However, some initial pointer where to start and what to look for would be very welcome.
Comment 9 Dani Megert CLA 2011-07-28 01:14:01 EDT
(In reply to comment #8)
> I am willing to try to fix the issue and provide a patch. However, some initial
> pointer where to start and what to look for would be very welcome.
You should offer your help in bug 324882 which is a prerequisite of this one.
Comment 10 Michael Pellaton CLA 2011-07-28 02:01:51 EDT
I am missing the link between the two bugs. My naive view suggest to "just" set the default block selection font to the same value as the default text font. Because the default text font already has the desired value (Consolas 10).
What's the point I am missing here?
Comment 11 Dani Megert CLA 2011-07-28 02:24:53 EDT
(In reply to comment #10)
> I am missing the link between the two bugs. My naive view suggest to "just" set
> the default block selection font to the same value as the default text font.
> Because the default text font already has the desired value (Consolas 10).
> What's the point I am missing here?

At the JFace level a font can be different on each OS. However, block selection along with its font(s) is at the editor and workbench level where fonts are contributed via themes. Those themes e.g. allow to adjust to large fonts for accessibility if the OS's theme is changed outside Eclipse.
Comment 12 Markus Keller CLA 2015-12-10 10:37:23 EST

*** This bug has been marked as a duplicate of bug 324810 ***