之前对此一无所知(也不可能全部看,也不可能看了就明白)。这次提交代码的时候,为此讨论了几次。
Alexei Podtelezhnikov commented:
In general, this API would be acceptable as long as it follows basic FreeType requirement: No floating point is allowed. Despite all the perceived conveniences of floating point for the user, FreeType remains a low level library possibly used on architectures that do not have FPU. I do not know if that is still true today. Still, we cannot break this rule for this. Therefore, the slant has to be passed as a fixed-point 16.16 sine and simply inserted in the matrix. This API remains ALPHA, which is to say it is subject to user customization.
意思就是说,FT允许CPU没有FPU(浮点单元)也能正常使用。
于是了解了一下定点数。就是一个小数,占用4个字节(32bit),指定其中几位(比如18)为整数,剩余的为小数(32-18=14)。
自然的,要专门的函数进行相关计算。