GDI, GDI+, EUDC, TextRenderer. Connection?

Sorting it all Out
Michael Kaplan's random stuff of dubious value
Be sure to read the disclaimer here first!

GDI, GDI+, EUDC, TextRenderer. Connection?

  • Comments 5

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)

Comment on the blather
Leave a Comment
  • Please add 3 and 2 and type the answer here:
  • Post
Blog - Comment List
  • 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... :)
  • That is the idea -- to have controls that would (by default) do the right thing.
  • Over the past six weeks I have received eight different requests for information on how to get various...
  • (Previous posts in this series can be read here and here ) There are a lot of different distribution

  • It is often the case that code does even more than the developers of the code describe, so much so that

Page 1 of 1 (5 items)