Check if text lines are being clipped due to height constraints
(&mut self, text: &str, font: &Resource, typesetting: TypesettingConfig)
| 182 | |
| 183 | /// Check if text lines are being clipped due to height constraints |
| 184 | pub fn lines_clipping(&mut self, text: &str, font: &Resource, typesetting: TypesettingConfig) -> bool { |
| 185 | let Some(max_height) = typesetting.max_height else { return false }; |
| 186 | let bounds = self.bounding_box(text, font, typesetting, true); |
| 187 | max_height < bounds.y |
| 188 | } |
| 189 | } |
no test coverage detected