rakhimov / scram

Probabilistic Risk Analysis Tool (fault tree analysis, event tree analysis, etc.)
https://scram-pra.org
GNU General Public License v3.0
133 stars 54 forks source link

GUI: Diagram unit dimensions are coupled with character dimensions #215

Closed rakhimov closed 7 years ago

rakhimov commented 7 years ago

This is both blessing and curse. On the one hand, this approach decouples the graphics from the screen dpi and ensures that boxes can fit n-character strings on m-lines. On the other hand, the diagram look changes as the system font type changes, which makes the graph look different on each operating system.

The solution can be to use absolute measures (cm) and lose the charachter fit guarantees.

Another solution is to use the same font accross operating systems.

rakhimov commented 7 years ago

There's no easy way to guarantee an availability of certain fonts on the platform even though some of them (Helvetica) are ubiquitous.

The current compromise is to fix the diagram unit dimensions (1 : 2) for width and height, but the absolute values are relative to the font height only (a single degree of freedom). This will keep the shapes the same across different platforms but at different scale depending on the font metrics.