Skip to content

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

Description

@pabulaner

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);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions