Re: commit (HEAD): remove block width cache

Date: Fri Mar 12 2004 - 08:51:36 EST

  • Next message: Dom Lachowicz: "Re: commit: Folding text within lists."


    Hi Tomas,
             This appears to have caused major cursor motion bugs and caret
    positioning bugs.

    Try clicking in the middle of a multi-line paragraph or try to use the up
    and down arrow keys in said paragraph.

    Look at the nice long paragraph in section 4 of the attached document.

    Even on a single line paragraph the caret appears 2 chars to the left of
    where you click your mouse.


    > I have removed the block width chache as this turned out to be a
    > fairly straight forward change; instead each text run has its own
    > cache inside its GR_RenderInfo structure (in fact, if the graphics
    > class does not want to cache width, it might not do so).
    > Layout class that needs to ascertain width of a certain character has
    > to do so using GR_Graphics::getTextWidth():
    > ri.m_iOffset = char_offset;
    > ri.m_iLength = 1;
    > iWidth = getGraphics()->getTextWidth(ri);
    > With this change, the layout classes are almost completely ignorant
    > of details of text shaping, measuring and caching; there is one or
    > two other changes needed inside fp_TextRun to make them completely
    > oblivious, which I will hopfully do over the weekend.
    > I have also changed the char advance cache used by the XP
    > implementation to a static one; this should significantly decrease
    > our memory footprint (it should have been static to start with,
    > oversight on my part).
    > Tomas

    This archive was generated by hypermail 2.1.4 : Fri Mar 12 2004 - 08:53:28 EST