GDI, GDI+, EUDC, TextRenderer. Connection?

by Michael S. Kaplan, published on 2005/06/27 23:43 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2005/06/27/433208.aspx


First I posted about Whidbey's TextRenderer.

Then I posted about enduserdefined characters.

Two concepts that have nothing in common, right?

Well, actually I am going to juxtapose these two concepts for a moment. :-)

Michael Warning (one of the cool Windows Client developers) had read that TextRenderer post and pointed out another really good reason for the existence of this new class. It boils down to interaction with EUDC!

One of the very interesting usage patterns that customers who use EUDC fonts is the need to dynamically update the font from time to time. Unfortunately, GDI+ locks the font file for the life of the application, which makes dyamic updates impossible.

(As I pointed out yesterday, one the biggest differences between GDI and GDI+ here is the perf. issues with GDI+'s attempts to be stateless. I do find the problem with EUDC to be kind of ironic since it involves GDI+ keeping the state of its font cache.)

Anyway, the TextRenderer does not have this problem. It allows for dynamic updates of EUDC fonts. Yet another reason that Whidbey's international support is cool in ways I never even knew about! :-)

 

This post brought to you by "傐" (U+5090, yet another CJK ideograph)


# Dean Harding on 28 Jun 2005 1:10 AM:

I don't have Whidbey installed here to check with Reflector, but do you know if the various WinForms controls use the TextRenderer class for all their text-rendering needs?

Wouldn't be much point if it only worked with custom controls... :)

# Michael S. Kaplan on 28 Jun 2005 7:13 AM:

That is the idea -- to have controls that would (by default) do the right thing.

referenced by

2010/01/22 From TTE to EUF: Possible?

2007/11/07 Often 'X doesn't work' in the docs actually implies 'We couldn't get X to work' :-)

2007/06/09 Guilt by [font ]association (aka The consequences of picking the wrong font #3)

2006/06/12 Uniscribe from Visual Basic

2005/06/28 The 'grammar' of identifiers

go to newer or older post, or back to index or month or day