@@ -879,6 +879,13 @@ LabelPosition* FeaturePart::curvedPlacementAtOffset( PointSet* path_positions, d
879
879
delete slp;
880
880
return nullptr ;
881
881
}
882
+ // Shift the character downwards since the draw position is specified at the baseline
883
+ // and we're calculating the mean line here
884
+ double dist = 0.9 * li->label_height / 2 ;
885
+ if ( orientation < 0 )
886
+ dist = -dist;
887
+ start_x += dist * cos ( angle + M_PI_2 );
888
+ start_y -= dist * sin ( angle + M_PI_2 );
882
889
883
890
double render_angle = angle;
884
891
@@ -1042,11 +1049,11 @@ int FeaturePart::createCurvedCandidatesAlongLine( QList< LabelPosition* >& lPos,
1042
1049
double angle_avg = atan2 ( sin_avg / li->char_num , cos_avg / li->char_num );
1043
1050
// displacement
1044
1051
if (( !reversed && ( flags & FLAG_ABOVE_LINE ) ) || ( reversed && ( flags & FLAG_BELOW_LINE ) ) )
1045
- positions.append ( _createCurvedCandidate ( slp, angle_avg, mLF ->distLabel () ) );
1052
+ positions.append ( _createCurvedCandidate ( slp, angle_avg, mLF ->distLabel () + li-> label_height / 2 ) );
1046
1053
if ( flags & FLAG_ON_LINE )
1047
- positions.append ( _createCurvedCandidate ( slp, angle_avg, -li-> label_height / 2 ) );
1054
+ positions.append ( _createCurvedCandidate ( slp, angle_avg, 0 ) );
1048
1055
if (( !reversed && ( flags & FLAG_BELOW_LINE ) ) || ( reversed && ( flags & FLAG_ABOVE_LINE ) ) )
1049
- positions.append ( _createCurvedCandidate ( slp, angle_avg, -li->label_height - mLF ->distLabel () ) );
1056
+ positions.append ( _createCurvedCandidate ( slp, angle_avg, -li->label_height / 2 - mLF ->distLabel () ) );
1050
1057
1051
1058
// delete original candidate
1052
1059
delete slp;
0 commit comments