On Fri, 25 Oct 2024 14:14:08 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
>> Andy Goryachev has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 14 additional >> commits since the last revision: >> >> - Merge remote-tracking branch 'origin/master' into ag.text.layout.api >> - Merge remote-tracking branch 'origin/master' into ag.text.layout.api >> - remove line spacing >> - tests >> - whitespace >> - caret info >> - text line info >> - Merge remote-tracking branch 'origin/master' into ag.text.layout.api >> - convert to wrapper >> - clarify >> - ... and 4 more: https://git.openjdk.org/jfx/compare/3e5d71cd...eb990081 > > modules/javafx.graphics/src/main/java/javafx/scene/text/CaretInfo.java line > 52: > >> 50: * <p> >> 51: * The geometry is encoded in an array of [x, ymin, ymax] values >> which >> 52: * represent a line drawn from (x, ymin) to (x, ymax). > > This seems overly restrictive, unless I don't understand what this does. How > would this work for caret that is "caret" shaped -- `^` -- or shaped line an > "I" with serifs? Presuming that specifying it with a series of geometric > lines is sufficient, should it be defined as `[xmin, xmax, ymin, ymax]` > instead? We are talking about "geometry", assuming two things: - the caret "geometry" represents a boundary between two characters and therefore is a line (or two lines in the case of a split caret) - the text is horizontal the latter poses a problem - on one hand, FX currently provides no support whatsoever for the vertical text, but that might change in the (distant) future. So perhaps Rectangle2D should work with the width of 0. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1596#discussion_r1817266150