isPunctuation method
smaller (~30%) in height artifacts will be considered punctuation
Implementation
bool isPunctuation() {
// Calculate the height of the content
final IntRect rect = getContentRect();
// If there's no content, it's not punctuation
if (rect.isEmpty) {
return false;
}
// Check if the content height is less than 40% of the total height
return rect.height < (rows * 0.40);
}