I found a funny quirk of JavaFX styling.
Create a shape with the following properties
- line drawing uses custom dash definition
- line cap set to square
- dash array has 0 length drawn segments and non 0 length drawn segments
You'll see the non 0 length segments are drawn along the stroke, and the square ends are rotated to match, but the 0 length segments are not rotated and stay vertically aligned.