[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] Windows font driver Parser
From: |
Werner LEMBERG |
Subject: |
Re: [ft] Windows font driver Parser |
Date: |
Thu, 03 Aug 2017 06:08:41 +0200 (CEST) |
[talking about the current git version of FreeType]
> 1) How windows font driver recognizes a window font file so that it can
> parse it.
I suggest that you use a debugger.
. Set a breakpoint at line 2255 in file `ftobjs.c' (in function
`ft_open_face_internal'). Here the central loop starts that walks
over all FreeType driver modules to find the right one.
. Single-step over the following code until you get acquainted a
bit.
. Later on, set a breakpoint at line 1202 in file `ftobjs.c' (in
function `open_face') and do single-stepping. Here you enter the
font module's `init_face' routines that check whether a given font
file can be handled by the module. If you are in the wrong module
you can simply continue to the next call of the breakpoint.
> Like in Type 1 driver module case there is a file t1parse.c which
> actually checks the header of a file that, if it starts with some
> specific text than this driver is selected for further parsing and
> so on.
Since the windows font driver is much simpler, everything is in one
file. The function to recognize a bitmap FNT file is `FNT_Face_Init'
(which is this module's `init_face' routine).
> 2) Is there any guide for the developer so that they can understand
> the flow of Freetype how code flows from start to end?
No. Such a guide doesn't make much sense IMHO since you are operating
at the lowest level of FreeType, and without knowing the intricate
details of the *whole* library you are rather lost.
You are invited, however, to contribute something :-) For example, you
might provide patches that add comments which you believe are missing
so that it is easier to understand what FreeType is doing.
A global overview is
https://www.freetype.org/freetype2/docs/design/index.html
> In my case i just want to read type1 font file or winfnt font file
> and check the number of faces, font family name, style name etc.
What you *really* want is to find out how FreeType is doing that so
that you can write your own stuff, right?
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 <=
- 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, 2017/08/03
- 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