font pointers in fp_Run

From: Tomas Frydrych (tomasfrydrych_at_yahoo.co.uk)
Date: Tue Mar 16 2004 - 05:18:09 EST

  • Next message: msevior_at_physics.unimelb.edu.au: "commit: Fix synthesized Symbol fonts on Unix."

    As I discussed with Martin over IRC, I think we should not store font
    pointers in fp_Run. Instead each font should have an id by which
    whould completely describe it, i.e., 'Times 10pt italic' would always
    translate to the same id, and the fp_Run should store that id instead
    of actual pointer. The graphics class would take care of translating
    these id's into pointers to actual fonts when pointers are really
    needed. This way we would not need to worry about stale pointers.

    The graphics should provide:

    typedef GR_FontId; // could be UT_String, uint, etc.

    GR_FontId GR_Graphics::getFont();
    void GR_Graphics::setFont(GR_FontId);

    void GR_Graphics::_setFont(GR_Font * pFont);
    GR_Font* GR_Graphics::_getFont()
    GR_Font* GR_Graphics::_getFontFromId(GR_FontId)

    Tomas



    This archive was generated by hypermail 2.1.4 : Tue Mar 16 2004 - 05:20:21 EST