> I found this internal Freetype document > > http://www.fifi.org/doc/libfreetype6/freetype2/
Ah, a very old version of https://www.freetype.org/freetype2/docs/design/index.html (I provided the link already in a previous e-mail). It seems that the old document contains slightly more information than the new one. However, I have no time currently to extend the new version, and I invite you to work on this – from experience I know that writing documentation *greatly* enhances the understanding (no joke). > It looks helpful but still no clue of how to understand the code > flow and how can we write our own driver module. I started windows > font driver as told that its the simplest but unable to figure it > out that how it works. You have to ask more specific questions, sorry. > 1) On base layer i.e. in src/base directory there are different high > level, low level APIs, font specific features with individual > driver module APIs. So when are these Driver module APIs called > like in case of windows font driver when this ftwinfnt.c is > invoked. The central structure used for communication between the base layer and a module is `FT_Module' (what a surprise :-), which points to `FT_ModuleRec' in `internal/ftobjs.h'. A module gets described with `FT_Module_Class', which provides the generic routines. The more specialized modules are derived from FT_Module_Class (by appending data to it), cf. `FT_Renderer_Class' or `FT_Driver_ClassRec'. Have a look into file `config/ftmodule.h' for an overview. > 2) Are driver modules only called by ftobjs.c where it checks which > driver to choose and than the driver who successfully parses the > font file is selected? No. For example, the TrueType font driver function `tt_face_init' calls `sfnt->init_face' (which expands to `sfnt_init_face'), since the basic SFNT capabilities shared between TTFs and OTFs are in the separate `sfnt' module. Werner _______________________________________________ Freetype mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/freetype
