← Back to team overview

kicad-developers team mailing list archive

Re: Re: Vector fonts

 

If I get it correctly your opinion is to simply use OS support for the fonts... that could be OK for 'typical' applications but not for CAD (nor for typography :P:P)


My opinion is that we need to explore using the wxFont API on top of wxGraphicsContext. I said nothing about wxDC, which as Jean-Pierre pointed out, is having problems scaling fonts.

And NO, we do not rasterize when drawing to the screen. We let wxGraphicsContext do what it was designed for.

Inherent in this design path is nearly a complete re-work of all the other drawing routines, moving them off of wxDC and onto wxGraphicsContext. Now for plotting, this is a separate subject. Here we do either a rasterization, or a font outline extraction from whatever wxFont is in play while drawing on screen.

I do not have strong opinion on which of the 2 techniques for plotting.


Anyway, your plan should be something like:
- Get the font online (with wxFont)
- Render it on a backing store bitmap (using wxDC)
- On screen blit the bitmap, on plot rasterize it.

The intermediate bitmap is needed becausee Windows doesn't do XORed text (or so it says in the docs). If step 1) goes fine, all the rest should work...



XORed text is a relic of the 80's. I think we can simply redraw in the machines of today. A dirty rect can be sent to the graphics library and it redraws it. The only time I think we need XORing is when sizing a rubber-banding graphic selection box.

Again, I have not suggested using a bitmap when drawing on screen. I am suggesting that we explore wxGraphicsContext's ability to support all our ON SCREEN drawing needs. We need the ON SCREEN support to be fast, as well as flexible enough to serve the needs of the international community.


Thank you for at least trying to understand my curiosities. My curiosities, if answered/understood, will help to illuminate the best way forward.


wxWidgets is a moving target, so it takes some time to gather a current comprehensive understanding. Recently I stumbled onto wxArt2d, so one has to ask, what is that for that wxWidgets cannot do? Why was it developed?


Dick








Follow ups

References