Re: inheritance problem with GR_Graphics

From: <msevior_at_physics.unimelb.edu.au>
Date: Sat Mar 19 2005 - 14:00:10 CET

>
>
> Doing some more work on the Pango class, I have run into a problem with
> what is meant to be a virtual static method. GR_Graphics has a *static*
> method findNearestFont(), which is implemented in the derrived classes;
> I think this is rather bad design, for it means that there can no
> graphics class that needs to implement this method unless it is a direct
> descendant of GR_Graphics (I need to implement it in
> gr_UnixPangoGraphics, which is derrived from gr_UnixGraphics, but that
> means GR_Graphics::findNearestFont() is declared twice.
>
> I was looking for the reason why this method is made static, and found
> it in pt_Piecetable::_loadBuiltInStyles(), which remaps 'Times New
> Roman' and 'Arial' to whatever it can find. I think that too is bad
> design. We should not do any font remapping in the PT, but leave it to
> the graphics class, because font availability, etc, belongs into the
> view part of the document/view model, not in the document part.
>
> The remapping of Arial and Times in the style deffinitions in
> _loadBuiltinStyles() is of a limited value anyway, because if we load an
> existing doc, the style definitions get overlayed by those in the doc,
> and if we create a new one, by those from normal.awt. In the light of
> that, I would like to completely remove GR_Graphics::findNearestFont().
> Any objections?

Neither of these fonts are available out of the box on free Linux distros
but I think font-config would solve the problem anyway.

Can you try removing these fonts from your Linux box and see how AbiWord
copes?

Think that both are avilable on all Win32 and OSX systmes. Right?

Couldyou test what happens on Linux systems? Please try printing a
document as well and loading and displaying one with times new roman and
arial.

Otherwise I don't object.

Cheers

Martin

>
> Tomas
>
>
>
Received on Sat Mar 19 14:00:52 2005

This archive was generated by hypermail 2.1.8 : Sat Mar 19 2005 - 14:00:52 CET