Canvas text rendering handles control character inconsistently, such as line feed

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 7u6
    • Affects Version/s: 7u6
    • Component/s: javafx


      context.font = "24pt Arial";
      context.textAlign = "center";
      context.fillStyle = "blue";
      context.fillText("Hello World!\nand\n3rd Line", x, y);

      The above code snipped will currently render text into multiple lines. But will have inconsistent alignment with JavaFX Text.

      - HTML5 Canvas strips out control characters, and only renders single line of text per fillText(...)
      - JavaFX Text however will create multiple lines and align them according to baseline, origin and wrapping width.

            Assignee:
            Thor Johannesson (Inactive)
            Reporter:
            Thor Johannesson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: