Here are my questions:
1. My environment: VS2005 SP1 + Platform Builder 6.0 SP1(Evaluation)+ PB 6.0
R2.
Is it sufficient? What else should I install?
2. In DrvEnableDriver(), the third parameter is in DRVENABLEDATA type, but
there isn't any define of DrvTextOut in winddi.h. How to let DrvTextOut be
used by GDI? Need I modify winddi.h? Also PENGCALLBACKS is in the same
situation.
3. How to let the founction pointers defined in fontdrv.h, such as
FDLOADFONTFILE(), FDQUERYFONT()..., being used? And how to use FD_INTERFACE?
4. Is a font driver in user-mode or kernel-mode? What's the difference?
Any futher suggestions are very appreciate. Thank you all very much.
Paul T.
"JackyLiao" <Jack...@discussions.microsoft.com> wrote in message
news:949B51B1-F880-418A...@microsoft.com...
1. The MSDN help is pretty specific about which of the functions are
required for font drivers:
DrvTextOut, FDDESTROYFONT, FDGETFONTTABLE, FDLOADFONTFILE, FDQUERYFONT,
FDQUERYFONTDATA, FDQUERYFONTFILE, and FDUNLOADFONTFILE are all indicated as
required for font drivers.
2. The help for each function also seems pretty clear about what it's
supposed to do. Obviously, I'm not actually trying to build a font driver,
or use some existing library to implement one, which seems like it would be
a trick, without you actually knowing the font's format yourself, but the
documentation appears to me to be pretty clear.
Paul T.
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:eanx1fBy...@TK2MSFTNGP05.phx.gbl...
I think the 7 functions are used while installing a font file into the
system, and help GDI to get a set of glyph metrics while drawing.
My question is how to let these 7 functions being uesd by GDI?
In fontdrv.h, it defines a FD_INTERFACE:
typedef struct
{
HINSTANCE library;
FDQUERYFONT pfnQueryFont;
FDQUERYFONTFILE pfnQueryFontFile;
FDQUERYFONTDATA pfnQueryFontData;
FDDESTROYFONT pfnDestroyFont;
FDLOADFONTFILE pfnLoadFontFile;
FDUNLOADFONTFILE pfnUnLoadFontFile;
FDGETFONTTABLE pfnGetFontTable;
} FD_INTERFACE, *LPFD_INTERFACE;
I think I have to set something like that:
ULONG Myfunc_LoadFontFile( .... );
FD_INTERFACE fdif;
fdif.pfnLoadFontFile = Myfunc_LoadFontFile;
....
and then return this fdif to GDI to be used.
But I don't know this should be done in which function.
Originally, I think it should be in DrvEnableDriver(),
but the definition of DrvEnableDriver() in winddi.h doesn't contain this part.
DRVENABLEDATA contains many DrvXxx() functions, but no the interface for
FD_INTERFACE.
Even DrvTextOut() are not shown in winddi.h .
So I confused of this, and read a lot of MSDN documents to figure it out.
Maybe I am a newer in this field, so I failed and come here.
Now I still don' know how to expose my implemented functions to GDI.
Could you please guide me what should I do?
Thank you very much.
JackyLiao
Yes, this is how I read what I see while executing a stub driver. On
startup, GWES loads the registry entries to find out which extensions it
should look for as "fonts". It also loads each font rendering engine found
in the registry. For each file found with a suitable extension, it calls
the rendering engine to see a) if the engine understands the file and, b) if
so, how many type faces are in the file (and what their information is).
> My question is how to let these 7 functions being uesd by GDI?
> In fontdrv.h, it defines a FD_INTERFACE:
> typedef struct
> {
> HINSTANCE library;
> FDQUERYFONT pfnQueryFont;
> FDQUERYFONTFILE pfnQueryFontFile;
> FDQUERYFONTDATA pfnQueryFontData;
> FDDESTROYFONT pfnDestroyFont;
> FDLOADFONTFILE pfnLoadFontFile;
> FDUNLOADFONTFILE pfnUnLoadFontFile;
> FDGETFONTTABLE pfnGetFontTable;
> } FD_INTERFACE, *LPFD_INTERFACE;
Don't do anything with this. This may be how GDI keeps track of the
functions for a single engine. I don't see any reason to believe that you'd
ever need to create one of these or use one. It looks to me like GDI just
looks for exported functions from the engine DLL which have suitable names.
> Could you please guide me what should I do?
No. I don't know any more than you do and don't have any source code that
you don't have for this part of the operating system. Have you emailed
Mike? Sue sent a message, as you saw, soliciting help from someone else on
the team. This is NOT going to be a quick process. I would not expect to
have a working engine for at least a month, if I were you.
Paul T.
As I said, I hope you're not in a hurry to get this!
Paul T.
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:eI5ajZOy...@TK2MSFTNGP06.phx.gbl...
> > My question is how to let these 7 functions being uesd by GDI?
> > In fontdrv.h, it defines a FD_INTERFACE:
> > typedef struct
> > {
> > HINSTANCE library;
> > FDQUERYFONT pfnQueryFont;
> > FDQUERYFONTFILE pfnQueryFontFile;
> > FDQUERYFONTDATA pfnQueryFontData;
> > FDDESTROYFONT pfnDestroyFont;
> > FDLOADFONTFILE pfnLoadFontFile;
> > FDUNLOADFONTFILE pfnUnLoadFontFile;
> > FDGETFONTTABLE pfnGetFontTable;
> > } FD_INTERFACE, *LPFD_INTERFACE;
>
> Don't do anything with this. This may be how GDI keeps track of the
> functions for a single engine. I don't see any reason to believe that you'd
> ever need to create one of these or use one. It looks to me like GDI just
> looks for exported functions from the engine DLL which have suitable names.
>
Thank you very much. This note points out that I'm on a wrong way.
I am doing reseach on this direction because I have no other methods to let
GDI use my own functions. But I didn't aware that it maybe still a wrong way.
I've emailed Mike yesterday. I think he(or she) will get the mail today
because of the time zone and office time. Thank you very much to estimate the
time schedule for me. I will keep in mind.
"Paul G. Tobey [eMVP]" wrote:
Anyway, thank you very much.
"Paul G. Tobey [eMVP]" wrote:
Yes, I can get my own engine loaded when the built-in True Type engine is
also loaded (it would be worthless, otherwise, and Microsoft seldom wastes
time on things like that). The documentation on MSDN is accurate in that
respect (how to get it loaded). You're worrying about speed?! If it's too
slow, then what? If you can afford NOT to have this other engine in your
OS, then LEAVE IT OUT and move on to more-productive work. In that case,
you won't have to figure out what's wrong with the documentation, what the
characteristics of the undocumented (or improperly documented), interface
is, etc.
Paul T.
"JackyLiao" <Jack...@discussions.microsoft.com> wrote in message
news:EAF1F4D1-8FBA-4E5C...@microsoft.com...
Anyway, thank you very much.
JackyLiao