Dear All, I have been looking at FreeType and thinking about how I could improve DirectFB's use of it. In particular, I would like to be able to render rotated text (in multiples of 90 degrees) and to make rendering of large font sizes (hundreds or thousands of pixels) more efficient.
FreeType lets you specify a transformation matrix which is applied to the vector font description, and they have example code for doing rotated text using this. So it should not be hard to add this to DirectFB. Perhaps the most difficult aspect would be to decide on how the DirectFB API would be extended to support this. Regarding large fonts, it looks to me as if the DirectFB freetype code loops over each pixel in the glyph bitmap and makes appropriate changes to the target surface, depending on the pixel format. But I note that typically only maybe 20% of pixels have the foreground colour, with most being background. So when the background is transparent, it would be much more efficient to only process the foreground pixels. It looks as if FreeType has an API that can supply raster spans rather than complete bitmaps, which could be used to achieve this improvement. I haven't studied this carefully though, so I may have misunderstood what is going on. Does anyone have any previous experience with FreeType that they would like to share? Is anyone else working on this sort of thing? How would you like a rotated text API to look? Are there any other font providers that I need to worry about? I'm currently using DirectFB 1.0; has any of this stuff changed in the current development versions? I will probably start on this work in the next few days, so if you have any comments or suggestions, please get in touch. Regards, Phil. _______________________________________________ directfb-dev mailing list [email protected] http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
