[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

Re: [XaraXtreme-dev] Substituted fonts and Bug 1057



Martin Wuerthner wrote:
OK, I will try it and see how much time is spent compiling the font information.

This is how the file info dialog does it (Kernel/finfodlg.cpp)

BOOL FileInfo::UpdateFontList(Document*	WorkDoc)
{
    ...
    List ItemList;

    // Build the font list for the specified document
    // This will NOT be alphabetical
    FontListItem* FontItem = NULL;
    if (WorkDoc)
    {
        FontList DocFonts;
        DocFonts.Build(WorkDoc);
        FontItem = DocFonts.GetFirstItem();

        // fill up the list
        while (FontItem != NULL)
        {
            // get the name
            ...
            String_64 strName = FontItem->GetFontName();
            ...
        }
    }
}

Alex