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

Bug 421359

Summary: Mac OS X: Strange fonts for required properties in the properties view
Product: [Modeling] Sirius Reporter: Tatiana Fesenko <tatiana.fesenko>
Component: DiagramAssignee: Maxime Porhel <maxime.porhel>
Status: CLOSED FIXED QA Contact: Maxime Porhel <maxime.porhel>
Severity: normal    
Priority: P3 CC: alex.lagarde, laurent.redor, maxime.porhel, p.beauvoir, pierre-charles.david
Version: unspecifiedKeywords: triaged
Target Milestone: 3.0.0M5   
Hardware: PC   
OS: Mac OS X   
Whiteboard:
Bug Depends on:    
Bug Blocks: 456339, 456922, 457608    
Attachments:
Description Flags
Tiny fonts for diagram description element
none
Tiny fonts for viewpoints
none
Screenshot of small fonts none

Description Tatiana Fesenko CLA 2013-11-08 12:42:24 EST
Created attachment 237315 [details]
Tiny fonts for diagram description element

The properties view of the Viewpoint Specification model uses tiny fonts for the label of required properties - see attached screenshots. This is difficult to read.
Comment 1 Tatiana Fesenko CLA 2013-11-08 12:42:53 EST
Created attachment 237316 [details]
Tiny fonts for viewpoints
Comment 2 Tatiana Fesenko CLA 2013-11-08 12:46:20 EST
I used today's daily build from the update site installed to a brand new Eclipse Kepler with a new workspace.
Comment 3 Alex Lagarde CLA 2013-11-12 05:41:19 EST
Issue reproduced with latest sirius build (2013-11-07)
Comment 4 Phil Beauvoir CLA 2014-12-15 08:09:34 EST
Created attachment 249430 [details]
Screenshot of small fonts

Just to confirm that fonts for some labels in the Properties View on Mac OS X 10.10 are too small.
Comment 5 Maxime Porhel CLA 2014-12-29 11:38:44 EST
 public static FontRegistry getFontRegistry() {
        if (fontRegistry == null) {
            fontRegistry = new FontRegistry();
            fontRegistry.put("required", new FontData[] { new FontData("Arial", 8, SWT.BOLD) });
            fontRegistry.put("description", new FontData[] { new FontData("Verdana", 8, SWT.ITALIC) });


The "required" and "description" are created once by the SiriusEditor (VSM editor). 


On Mac OS X (on my computer), the default font is:  Helvetica Neue deskInterface, 13, SWT.NORMAL:

(org.eclipse.swt.graphics.FontData[]) [1|.Helvetica Neue DeskInterface|13.0|0|COCOA|1|.HelveticaNeueDeskInterface-Regular]

If possible, the font registry should retrieve the current default font (eclipse properties, system, .. ) and only change the style to Bold or Italic. 

The font was set to 8 because it was the size of the non required section names.  the style and size but not real font.
Comment 6 Maxime Porhel CLA 2014-12-29 11:44:49 EST
See 
  https://git.eclipse.org/r/38818


The proposed correction keep the old behavior if no defaut font data are found.
Comment 7 Maxime Porhel CLA 2014-12-30 05:11:10 EST
See https://git.eclipse.org/r/38834 for additional cleanup: the description font is not necessary as it is not used to configure the tooltip style. 

This commit commit does not need to be backported on the Sirius 2.0.x branch.
Comment 8 Pierre-Charles David CLA 2014-12-30 07:52:38 EST
Cloned as bug #456339 to backport into Sirius 2.0.x.
Comment 9 Maxime Porhel CLA 2014-12-30 08:09:35 EST
Fixed by commits 0020b6a3d71b04854ee00111b34ddd162619ea2c and a51c313b1cc5d5983928757aa890fb56ce98c0c5. 

Only 0020b6a3d71b04854ee00111b34ddd162619ea2c needs a cherry-pick for 2.0.x correction (see Bug 456339)
Comment 10 Pierre-Charles David CLA 2015-01-07 09:28:30 EST
Also cloned as bug #456922 to backport the fix into Sirius 1.0.2 for Luna SR2.
Comment 11 Maxime Porhel CLA 2015-04-27 05:06:09 EDT
Verified on Sirius 3.0.0 M6
Comment 12 Pierre-Charles David CLA 2015-06-24 11:15:27 EDT
Available in Sirius 3.0.0. See https://wiki.eclipse.org/Sirius/3.0.0.