Hi All,
The text orientation depends on the sketch orientation, not on the start/end points of the line/path.
You can check the sketch orientation with sketch.xDirection and sketch.yDirection attributes (please note that "x" and "y" directions mean the 2 perpendicular vectors used to build the sketch plane, and not the actual x and y axes of the model)
I'll try to explain it with an example. I'm attaching a model with 6 faces. Each face has 4 lines, 2 parallels to the axis and 2 diagonals. Then I use every line to write the "abc" text (all of them with the same definition: centered, above the path, not flips).
Then I ran this script to get the x and y directions of every sketch:
def getSketchsOrientation():
for sk in root.sketches:
app.log(f'{sk.name} {sk.xDirection.asArray()} {sk.yDirection.asArray()}')
The result is the following:
xyInternal (-1.0, 0.0, 0.0) (0.0, -1.0, 0.0)
xzInternal (-1.0, 0.0, 0.0) (0.0, 0.0, 1.0)
yzInternal (0.0, 1.0, 0.0) (0.0, 0.0, 1.0)
xyExternal (1.0, 0.0, 0.0) (0.0, -1.0, 0.0)
yzExternal (0.0, -1.0, 0.0) (0.0, 0.0, 1.0)
xzExternal (1.0, 0.0, 0.0) (0.0, 0.0, 1.0)
The first coordinate defines the orientation through the "right-hand" side and the second to the "up" orientation.
As an example for yzExternal sketch: the right-hand-side is towards Y- (0.0, -1.0, 0.0) and up is towards Z+ (0.0, 0.0, 1.0). {these are the real X, Y, Z design coordinates}
So, then, you can check the texts orientation in the model for yzExternal sketch:

You can see that for the lines which start's and end's point have a difference in real-Y the text is written left to right first (towards Y-) and the up or down following the path; in the case of the vertical lines, whose real-Y coordinate is the same, the text is written vertical towars Z+. (use the help of the viewCube on right-top corner to confirm the orientation; on it the line color axis are drawn from center point towards the positive dimension)
I checked all texts in the 6 sketch planes in the model, and all texts are consistent in the orientation.
@lionel.courgnaud : could you check this with the sketch in you model?
Hope this help everyone to understand it better.
Regards,
Jorge