I've done this type of coding before for a general purpose GUI framework for PC and Windows Mobile. The implementation can get complex quickly. In my case I support rich-text, based on a very primitive html-like syntax (allowing font attributes, word breaks, images, etc). As far as performance, I only perform text layout once, during which I generate a set of draw commands. Essentially each call to a Graphics drawing routine is cached as a command, with all associated parameters you would normally pass. The only time a new layout needs to occur is if your text is changed or the control is resized. You do not need to do a new layout while scrolling - simply offset your drawing origin based on the scroll position.
As Mark suggested, estimation can vastly increase performance. For estimation use the average character width. I don't see an api to determine that exactly, so instead you can use getAdvance and pass it a string like "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW XYZ0123456789" and throw in whatever other symbols (don't forget the space character) you expect to encounter, then divide the resulting width by the number of letters in your string.