@@ -365,17 +365,6 @@ impl TextDisplay {
365365 MarkerPosIter { v, a, b }
366366 }
367367
368- /// Get the number of glyphs
369- ///
370- /// [Requires status][Self#status-of-preparation]: lines have been wrapped.
371- ///
372- /// This method is a simple memory-read.
373- #[ inline]
374- #[ cfg( feature = "num_glyphs" ) ]
375- pub fn num_glyphs ( & self ) -> usize {
376- to_usize ( self . num_glyphs )
377- }
378-
379368 /// Iterate over runs of positioned glyphs
380369 ///
381370 /// All glyphs are translated by the given `offset` (this is practically
@@ -390,8 +379,7 @@ impl TextDisplay {
390379 /// where `i` is the largest value such that `effects[i].0 <= j`, or the
391380 /// default value of `E` if no such `i` exists.
392381 ///
393- /// Runs are yielded in undefined order. The total number of
394- /// glyphs yielded will equal [`TextDisplay::num_glyphs`].
382+ /// Runs are yielded in undefined order.
395383 ///
396384 /// [Requires status][Self#status-of-preparation]:
397385 /// text is fully prepared for display.
@@ -441,6 +429,10 @@ impl TextDisplay {
441429 /// text is fully prepared for display.
442430 ///
443431 /// Calls `f(top_left, bottom_right)` for each highlighting rectangle.
432+ #[ deprecated(
433+ since = "0.10.0" ,
434+ note = "Since the same result may be achieved using text background colors this will likely be removed in the future."
435+ ) ]
444436 pub fn highlight_range ( & self , range : std:: ops:: Range < usize > , f : & mut dyn FnMut ( Vec2 , Vec2 ) ) {
445437 for line in & self . lines {
446438 let line_range = line. text_range ( ) ;
@@ -453,6 +445,7 @@ impl TextDisplay {
453445 let br = Vec2 ( self . r_bound , line. bottom ) ;
454446 f ( tl, br) ;
455447 } else {
448+ #[ allow( deprecated) ]
456449 self . highlight_line ( line. clone ( ) , range. clone ( ) , f) ;
457450 }
458451 }
@@ -465,6 +458,10 @@ impl TextDisplay {
465458 ///
466459 /// Warning: runs are in logical order which does not correspond to display
467460 /// order. As a result, the order of results (on a line) is not known.
461+ #[ deprecated(
462+ since = "0.10.0" ,
463+ note = "Since the same result may be achieved using text background colors this will likely be removed in the future."
464+ ) ]
468465 fn highlight_line (
469466 & self ,
470467 line : Line ,
0 commit comments