
#include "kjs/wk_config.h"
#include <font/BTGlyphPageTreeNode.h>

#include "BCFontPlatformDataPrivateDirectFB.h"
#include <font/FontData.h>

#include <directfb.h>

#include "BTLogHelper.h"

namespace BAL {

bool BTGlyphPage::fill(UChar* buffer, unsigned bufferLength, const FontData* fontData)
{
    DBGML(MODULE_FONTS, LEVEL_INFO, "\nBTGlyphPage::fill()\n");

    bool haveGlyphs = false;
    for (unsigned i = 0; i < bufferLength; i++) {
        Glyph glyph = buffer[i];
        if (!glyph)
            setGlyphDataForIndex(i, 0, 0);
        else {
            setGlyphDataForIndex(i, glyph, fontData);
            haveGlyphs = true;
        }
    }

    return haveGlyphs;
}

} //namespace BAL
