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

Bug 375644

Summary: [GC] Font definition is transmitted in an inconsistent format
Product: [RT] RAP Reporter: Moritz Post <mpost>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.4   
Target Milestone: 1.5 M7   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Moritz Post CLA 2012-03-29 11:59:30 EDT
When setting the font on the GC like:

Font font = new Font( display, new FontData( "Verdana", 30, SWT.BOLD | SWT.ITALIC ) );
e.gc.setFont( font );

The resulting protocol message looks like

[ "font", "italic bold 30px Verdana" ]

This css based font definition is hard to parse as bold and italic can be ommited at will. In addition this format is inconsistent with other places where a font is transmitted like string measurement or setting FontData.

The font format for these other two places should be applied to the GC font definition as well. It looks like a json list:

[font, size, bold, italic]

Each field is mandatory.
Comment 1 Ivan Furnadjiev CLA 2012-04-02 06:03:55 EDT
Changed the format of transmitted GC font as suggested - [ names, size, bold, italic ]. Changes are in CVS HEAD.