Skip to content

Font too small on HiDPI screens #233

@tferr

Description

@tferr

@tinevez , just noticed that trackmate has unreadable fonts on a 4K display on Linux. Here is a comparison to a regular scijava command prompt:

image

I guess the issue is hardwired here:

public static final Font FONT = new Font( "Arial", Font.PLAIN, 10 );
public static final Font BIG_FONT = new Font( "Arial", Font.PLAIN, 14 );
public static final Font SMALL_FONT = FONT.deriveFont( 8 );
public static final Font SMALL_FONT_MONOSPACED = new Font( "Courier New", Font.PLAIN, 11 );
public static final Dimension TEXTFIELD_DIMENSION = new Dimension( 40, 18 );

I guess an option would to be define the base font from the UIManager e.g., UIManager.getFont("TextField.font").getSize(); and scale the others from there!? There is also the gui scaling factor in IJ1 prefs that could be applied. (the assumption there, would be that if users are scaling AWT fonts, they will likely want to scale TrackMate fonts as well).

Java 11, and Mac/Windows may be shielded from this. Did not check.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions