When is DrvQueryFont called
What are the possible factors in order to be called

TI
alviin

Re: DrvQueryFont by Ashwin

Ashwin
Fri Feb 27 16:36:39 CST 2004

It is difficult to give a definitive answer to that question because it
really depends on factors such as what function(s) the printing app calls.
So the factors can vary based on the specific scenario. If this issue is
really important to you, I suggest that you open a support incident with the
DDK Support group at Microsoft and they will be able to walk you through
your specific scenario.

--
- Ashwin

Microsoft Printing, Imaging and Fax Team
This posting is provided "AS IS" with no warranties, and confers no rights.

"alvin" <anonymous@discussions.microsoft.com> wrote in message
news:4306B421-8A5D-4556-8ED4-987B2601FD04@microsoft.com...
> When is DrvQueryFont called?
> What are the possible factors in order to be called?
>
> TIA
> alviin



Re: DrvQueryFont by anonymous

anonymous
Fri Feb 27 19:26:07 CST 2004

Thank you Ashwin

I call EnumFontFamiliesEx in the application. And the driver/device supports device fonts
It seems there are many factors but I thought there should be a definite call pattern
And with that call pattern, the behavior can be investigated
On the DDK itself however, there is no definite explanation on this
Hope I can get any lead or help on how to approach this

I'll try to investigate this further hoping to find any lead
Really appreciate your help

alvi

----- Ashwin [MS] wrote: ----

It is difficult to give a definitive answer to that question because i
really depends on factors such as what function(s) the printing app calls
So the factors can vary based on the specific scenario. If this issue i
really important to you, I suggest that you open a support incident with th
DDK Support group at Microsoft and they will be able to walk you throug
your specific scenario

--
- Ashwi

Microsoft Printing, Imaging and Fax Tea
This posting is provided "AS IS" with no warranties, and confers no rights

"alvin" <anonymous@discussions.microsoft.com> wrote in messag
news:4306B421-8A5D-4556-8ED4-987B2601FD04@microsoft.com..
> When is DrvQueryFont called
> What are the possible factors in order to be called
>> TI
> alvii




Re: DrvQueryFont by Ashwin

Ashwin
Fri Feb 27 20:19:11 CST 2004

I suggest that you use standard apps like Wordpad or Word. I vaguely recall
in some past debugging that DrvQueryFontTree is definitely hit in just
normal/regular use of Wordpad. I don't recall now if DrvQueryFont is also
hit. In any case, I am sure one of these apps will have code that will
eventually result in DrvQueryFont being called. So you should probably play
around with fonts in these apps.

--
- Ashwin

Microsoft Printing, Imaging and Fax Team
This posting is provided "AS IS" with no warranties, and confers no rights.

"alvin" <anonymous@discussions.microsoft.com> wrote in message
news:D1F6F20D-FDBC-4C4D-86C7-156B5A9BDB64@microsoft.com...
> Thank you Ashwin,
>
> I call EnumFontFamiliesEx in the application. And the driver/device
supports device fonts.
> It seems there are many factors but I thought there should be a definite
call pattern.
> And with that call pattern, the behavior can be investigated.
> On the DDK itself however, there is no definite explanation on this.
> Hope I can get any lead or help on how to approach this.
>
> I'll try to investigate this further hoping to find any lead.
> Really appreciate your help.
>
> alvin
>
> ----- Ashwin [MS] wrote: -----
>
> It is difficult to give a definitive answer to that question because
it
> really depends on factors such as what function(s) the printing app
calls.
> So the factors can vary based on the specific scenario. If this issue
is
> really important to you, I suggest that you open a support incident
with the
> DDK Support group at Microsoft and they will be able to walk you
through
> your specific scenario.
>
> --
> - Ashwin
>
> Microsoft Printing, Imaging and Fax Team
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "alvin" <anonymous@discussions.microsoft.com> wrote in message
> news:4306B421-8A5D-4556-8ED4-987B2601FD04@microsoft.com...
> > When is DrvQueryFont called?
> > What are the possible factors in order to be called?
> >> TIA
> > alviin
>
>
>



Re: DrvQueryFont by Ashwin

Ashwin
Mon Mar 01 12:21:48 CST 2004

On looking at the code, it appears that cFonts might be related to
DrvQueryFont, but this is not really significant. The calling of
DrvQueryFont has nothing (or atleast not much) to do with Unidrv
itself....it depends on GDI. It appears that GDI does have a function that
gets called when EnumFont, EnumFontFamilies or EnumFontFamiliesEx gets
called. This in turn determines if any device fonts exist and then makes a
series of calls that eventually result in DrvQueryFont being called in the
driver...Unidrv in this case.

Note that my analysis is only based on looking through the code and not on
debugging the code. So the code flow might actually be different depending
on other factors that come into play.

--
- Ashwin

Microsoft Printing, Imaging and Fax Team
This posting is provided "AS IS" with no warranties, and confers no rights.

"alvin" <anonymous@discussions.microsoft.com> wrote in message
news:DEF3D274-DA07-41F7-BC25-EC92FC19E2AA@microsoft.com...
> I tried using EnumFontFamiliesEx in my application.
> I observed particularly the values of cFonts.
> By implementation of the Unidrv, is there a direct relation of cFont and
DrvQueryFont?
>
> TIA
> alvin



Re: DrvQueryFont by Ashwin

Ashwin
Tue Mar 02 11:48:06 CST 2004

It doesn't depend exclusively on cFonts although it will certainly play a
role in the eventual decision to call DrvQueryFont.

--
- Ashwin

Microsoft Printing, Imaging and Fax Team
This posting is provided "AS IS" with no warranties, and confers no rights.

"alvin" <anonymous@discussions.microsoft.com> wrote in message
news:120833DF-5845-47C2-9DFB-55F01827B7D8@microsoft.com...
> Thanks Ashwin,
>
> Just an extra question.
> Do you think there is a high possibility that GDI decides to call its
function (to determine if any device fonts exist that eventually calls
drivers DrvQueryFont) based on the value of the cFonts?
>
> TIA
> alvin



Re: DrvQueryFont by anonymous

anonymous
Tue Mar 02 19:26:07 CST 2004

Thank you again Ashwin

I understand

However, based in the DDK, cFonts defines the number of device fonts supported by the device, and cFonts is 0, will GDI still call DrvQueryFont

Thanks in advance
alvi


Re: DrvQueryFont by Ashwin

Ashwin
Tue Mar 02 20:01:12 CST 2004

From the DDK: If the driver sets cFonts to -1, GDI will wait until fonts are
needed to query the driver for the actual number of fonts it supports in a
call to DrvQueryFont.

--
- Ashwin

Microsoft Printing, Imaging and Fax Team
This posting is provided "AS IS" with no warranties, and confers no rights.

"alvin" <anonymous@discussions.microsoft.com> wrote in message
news:07FC4872-FDDD-4A24-8CB9-98B42186E211@microsoft.com...
> Thank you again Ashwin,
>
> I understand.
>
> However, based in the DDK, cFonts defines the number of device fonts
supported by the device, and cFonts is 0, will GDI still call DrvQueryFont?
>
> Thanks in advance,
> alvin
>



Re: DrvQueryFont by anonymous

anonymous
Tue Mar 02 20:51:06 CST 2004

> However, based in the DDK, cFonts defines the number of device font
>>supported by the device, and cFonts is 0, will GDI still call DrvQueryFont

Sorry my mistake
What I mean is, based from the DDK, cFonts specifies the number of supported device fonts of the device
And if the driver sets cFonts to -1, GDI will wait until fonts are needed to query the driver for the actual number of fonts it supports in a call to DrvQueryFont

What if, cFonts is 0, will GDI still call DrvQueryFont

TIA
alvi


Re: DrvQueryFont by Ashwin

Ashwin
Tue Mar 02 21:43:00 CST 2004

It depends on what Unidrv finds with regard to device fonts. During the
EnablePDEV phase, Unidrv attempts to find all device fonts based on their
accompanying PFM files and comes up with the number of device fonts and
passes this info to GDI. Now, if no other device font other than the ones
enumerated in this stage are required by GDI, DrvQueryFont will not be
called. But in other cases, it will be called.

--
- Ashwin

Microsoft Printing, Imaging and Fax Team
This posting is provided "AS IS" with no warranties, and confers no rights.

"alvin" <anonymous@discussions.microsoft.com> wrote in message
news:8097AAD0-965F-45DB-995E-46E273BC620D@microsoft.com...
> > However, based in the DDK, cFonts defines the number of device fonts
> >>supported by the device, and cFonts is 0, will GDI still call
DrvQueryFont?
>
> Sorry my mistake.
> What I mean is, based from the DDK, cFonts specifies the number of
supported device fonts of the device.
> And if the driver sets cFonts to -1, GDI will wait until fonts are needed
to query the driver for the actual number of fonts it supports in a call to
DrvQueryFont.
>
> What if, cFonts is 0, will GDI still call DrvQueryFont?
>
> TIA,
> alvin
>



Re: DrvQueryFont by anonymous

anonymous
Tue Mar 02 22:06:11 CST 2004

Thank you Ashwin
Really appreciate your great help

alvin