Fully featured low overhead profiler for Java EE and Java SE platforms.
Easy to use performance and memory .NET profiler for Windows and Linux.
Performance monitoring and profiling of Jenkins, Bamboo, TeamCity, Gradle, Maven, Ant and JUnit.

Font scaling in 2020.7

Moderators: Vladimir Kondratyev, Anton Katilin

Font scaling in 2020.7

Postby eprst » Sat Aug 08, 2020 1:01 am

I have a mixed DPI setup with 4K screen on my laptop and a "regular" DPI external monitor. My Linux/KDE is configured with ~170% font scaling so that things don't look too tiny on the laptop screen, and I scale fonts down in IDE/Browser etc if I move them to the external monitor.

YourKit used to respect `yk.font.scale` settings but not anymore, everything is huge with my setup. Any workaround?

Relevant log lines:
Code: Select all
20.7-369 0.000: Command line:
20.7-369 0.074: com.yourkit.ae.z.e: sun.java2d.opengl=true
20.7-369 0.074: com.yourkit.ae.z.e: awt.useSystemAAFontSettings=lcd
20.7-369 0.075: com.yourkit.ae.z.e: sun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine
20.7-369 0.525: com.yourkit.ae.z.a.d: Cannot detect Xft/DPI; fallback to default 96
20.7-369 0.526: com.yourkit.ae.z.a.d: gnome.Xft/DPI=98304
20.7-369 0.526: com.yourkit.ae.af.a: JVM UI scale enabled=true
20.7-369 0.526: com.yourkit.ae.af.a: JVM UI scale=1
20.7-369 0.527: com.yourkit.ae.af.a: System UI scale=1.0
20.7-369 0.528: com.yourkit.ae.af.a: Font scale=1.3333333333333333
20.7-369 0.610: com.yourkit.ae.af.a: Primary font=java.awt.Font[family=Dialog,name=Dialog,style=plain,size=12]
20.7-369 0.610: com.yourkit.ae.af.a: Menu font=java.awt.Font[family=Dialog,name=Dialog,style=plain,size=12]
20.7-369 0.611: com.yourkit.ae.af.a: Found theme=DARK
20.7-369 0.611: com.yourkit.ae.af.a: Scaled primary font=java.awt.Font[family=Dialog,name=Dialog,style=plain,size=16]
20.7-369 0.611: com.yourkit.ae.af.a: Scaled menu font=java.awt.Font[family=Dialog,name=Dialog,style=plain,size=16]
Posts: 4
Joined: Mon Oct 01, 2018 7:43 am

Re: Font scaling in 2020.7

Postby Vladimir Kondratyev » Sun Aug 09, 2020 9:05 am

1. Please try disable HiDPI scaling by adding "-Dsun.java2d.uiScale.enabled=false" to startup parameters.

2. Custom font size can be set with "yk.font.size" integer property.
Vladimir Kondratyev
Posts: 1527
Joined: Tue Aug 10, 2004 7:52 pm
Location: Düsseldorf, Germany

Re: Font scaling in 2020.7

Postby eprst » Mon Aug 17, 2020 11:38 pm

"-Dsun.java2d.uiScale.enabled=false" makes it more usable, but "yk.font.size" has no effect
Posts: 4
Joined: Mon Oct 01, 2018 7:43 am

Re: Font scaling in 2020.7

Postby Anton Katilin » Tue Aug 18, 2020 9:02 am

In addition to "yk.font.size" please also specify "yk.font.name".

You can find the font name in the profiler UI log file <user home>/.yjp/log/profiler-ui-<pid>.log. Search for the line with text "Primary font" to look up the font name.
Anton Katilin
Posts: 6062
Joined: Wed Aug 11, 2004 8:37 am

Re: Font scaling in 2020.7

Postby eprst » Tue Aug 18, 2020 10:13 pm

ok works this way, thanks!
Posts: 4
Joined: Mon Oct 01, 2018 7:43 am

Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 1 guest


YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.