Skip to content
New issue

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

Text in some cases is underlined in a weird way #180

Open
pabulaner opened this issue Jul 30, 2024 · 1 comment
Open

Text in some cases is underlined in a weird way #180

pabulaner opened this issue Jul 30, 2024 · 1 comment

Comments

@pabulaner
Copy link

When text is set to be underlined and it contains letters that extend bellow the baseline (like a 'y'), it is done so in a weird way. Instead of being underlined with one line, it seems to be dotted.
Expected behavior would be to see one continues line.

Actual result:
image

Expected result:
image832

Code to reproduce:

package one.jpro.hellojpro;

import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.text.Font;
import javafx.stage.Stage;

/**
 * Hello JPro application.
 *
 * @author Florian Kirmaier
 */
public class HelloJPro extends Application {

    @Override
    public void start(Stage stage) {
        Label label = new Label("yyyyyy");
        label.setFont(new Font(50));
        label.setUnderline(true);
        label.setAlignment(Pos.CENTER);
        stage.setScene(new Scene(label));
        stage.show();
    }

    /**
     * Application entry point.
     *
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        launch(args);
    }
}
@FlorianKirmaier
Copy link
Contributor

Quick feedback.
I can confirm this behavior.
It happens with characters that extend downwards.
I'm not sure what to do with it - it seems like an intentional browser feature. It is questionable whether it's work to work around this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants