2008/6/26 Stephan Assmus <superstippi@xxxxxx>: > Makes a lot of sense. Please do create enhencement tickets, so that these > remarks don't get lost. Even BTextView uses a "width cache buffer" to avoid > too many calls for getting the width of glyphs. Maybe this can be done on > the BFont level instead of on the individual view class level. I thought about that too. But there is a problem: That kind of caching can only be done if the font spacing used is B_CHAR_SPACING, because it's the only mode where the width of a string is the sum of the widths of the single characters (IOW: "abc" has the same width as "cab" or "acb"), so caching the width of the single characters is all you have to do. In B_STRING_SPACING, the width of a string also depends on the position of the characters, so that there is no simple way of caching like it's done in in the width cache buffer used by BTextView.