- if (r->internal_has_interface (ly_symbol2scm ("lyric-syllable-interface")))
- right_point = right_point <? (r->extent (common, X_AXIS)[LEFT] - pad);
- else if (Note_head::has_interface (r))
- ;
- else if (!last_line)
- {
- /*
- run to end of line.
- */
- right_point = right_point >? (r->extent (common, X_AXIS)[LEFT] - pad);
- }
-
- if (isinf (right_point))
- {
- programming_error ("Right point of extender not defined?");
- right_point = r->relative_coordinate (common, X_AXIS);
- }
+ if (right_text)
+ right_point = min (right_point, (robust_relative_extent (right_text, common, X_AXIS)[LEFT] - pad));