forked from enlightenment/efl
b542743d9e
Before it was using a linear search with initial step proportional to difference bettwen desired and current height, but the way it was implemented it was giving incorrect values, for example: a text in an animation that enlarges height was getting size_{n} < size_{n-1}, where it should be always the oposite (the sequence was like: 31, 32, 33, 34, 31, 33, 34, 35, ...). One way to avoid that was to recalculate "dif" based on new "th", but it quickly drop to 1. The current implementation now uses a binary search to find the first size that matches the desired height and then a linear search to search the largest font doing that (differents sizes may result in the same height). This linear search is often an extra lookup and can be avoided if we want just something that fits (instead of the largest). SVN revision: 32146 |
||
---|---|---|
legacy |