[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] Windows font driver Parser
From: |
Ammar ul hassan |
Subject: |
Re: [ft] Windows font driver Parser |
Date: |
Thu, 3 Aug 2017 14:13:34 +0900 |
> What you *really* want is to find out how FreeType is doing that so
that you can write your own stuff, right?
Yes i want to write my own stuff for Freetype, adding a new driver module
more specifically. So for that i need to understand how the code really
works.
> from experience I know
that writing documentation *greatly* enhances the understanding (no
joke).
I will be happy to contribute for Freetype :)
Thanks for your comments on my questions i will look in detail on all your
answers for better understanding.
On Thu, Aug 3, 2017 at 1:40 PM, Werner LEMBERG <address@hidden> wrote:
>
> > 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
>
- [ft] Windows font driver Parser, Ammar ul hassan, 2017/08/02
- Re: [ft] Windows font driver Parser, J Decker, 2017/08/02
- Re: [ft] Windows font driver Parser, Werner LEMBERG, 2017/08/03
- Re: [ft] Windows font driver Parser, Ammar ul hassan, 2017/08/03
- Re: [ft] Windows font driver Parser, Ammar ul hassan, 2017/08/03
- Re: [ft] Windows font driver Parser, Werner LEMBERG, 2017/08/03
- Re: [ft] Windows font driver Parser,
Ammar ul hassan <=
- Re: [ft] Windows font driver Parser, Werner LEMBERG, 2017/08/03
- Re: [ft] Windows font driver Parser, Ammar ul hassan, 2017/08/03
- Re: [ft] Windows font driver Parser, Lawrence D'Oliveiro, 2017/08/03
- Re: [ft] Windows font driver Parser, Werner LEMBERG, 2017/08/05