We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JLabel html rendering changes font size with java 17 using flatlaf 3.5.2
JLabel l1 = new JLabel("Destination"); String htmlDestination = "<HTML><A HREF=http://destination>Destination</A></HTML>"; JLabel l2 = new JLabel(htmlDestination);
Without flatlaf
The following code can be used to reproduce the issue:
import static javax.swing.SwingUtilities.*; import java.awt.Font; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.UIManager; import org.jdesktop.swingx.JXFrame; import com.formdev.flatlaf.FlatLightLaf; import net.miginfocom.swing.MigLayout; public class FlatLafTextFieldHtmlIssue extends JXFrame { public FlatLafTextFieldHtmlIssue() { try { UIManager.setLookAndFeel(new FlatLightLaf()); } catch (Exception e) { e.printStackTrace(); } JPanel p = new JPanel(new MigLayout()); JLabel l1 = new JLabel("Destination"); p.add(l1, "wrap"); String htmlDestination = "<HTML><A HREF=http://destination>Destination</A></HTML>"; JLabel l2 = new JLabel(htmlDestination); p.add(l2, "wrap"); getContentPane().add(p); Font f1 = l1.getFont(); Font f2 = l2.getFont(); System.out.println(f1); System.out.println(f2); setTitle("Flat Laf Html Text Issue"); setDefaultCloseOperation(EXIT_ON_CLOSE); pack(); setVisible(true); } public static void main(String[] args) { invokeLater(() -> { new FlatLafTextFieldHtmlIssue(); }); } }
The text was updated successfully, but these errors were encountered:
Which operating system do you use?
Sorry, something went wrong.
Fedora 40, KDE, Xorg session
Linux: fixed slightly different font size (or letter width) used to p…
3f33543
…aint HTML text when default font family is _Cantarell_ (e.g. on Fedora) (issue #912) the removed use of floating point font size is similar to what is done in JDK for GTK Look and Feel: - https://bugs.openjdk.org/browse/JDK-6979979 - openjdk/jdk@306f12d
Fixed in latest 3.5.3-SNAPSHOT: https://github.com/JFormDesigner/FlatLaf#snapshots
3.5.3-SNAPSHOT
No branches or pull requests
JLabel html rendering changes font size with java 17 using flatlaf 3.5.2
Without flatlaf
The following code can be used to reproduce the issue:
The text was updated successfully, but these errors were encountered: