私は持っていString text = "Some text"ます。
たとえば、テキストを TextView に配置した場合、テキストの高さがどうなるかを知る必要がありwidth = x dpますheight = y dp。
たとえば、iOS では次のようにできます。
CGSize size = [self.text sizeWithFont:[UIFont fontWithName:fontName size:fontSize]
constrainedToSize:CGSizeMake(100, 10000)
lineBreakMode:0];
Paint.getTextBounds()テキストを行に分割しないため、ここでは機能しません。