Lines Matching defs:Font
36 Font::Font(Context *rsc) : ObjectBase(rsc), mCachedGlyphs(NULL) {
42 bool Font::init(const char *name, float fontSize, uint32_t dpi, const void *data, uint32_t dataLen) {
57 ALOGE("Unable to initialize font %s", name);
67 ALOGE("Unable to set font size on %s", name);
78 void Font::preDestroy() const {
87 void Font::invalidateTextureCache() {
93 void Font::drawCachedGlyph(CachedGlyphInfo *glyph, int32_t x, int32_t y) {
113 void Font::drawCachedGlyph(CachedGlyphInfo* glyph, int32_t x, int32_t y,
139 void Font::measureCachedGlyph(CachedGlyphInfo *glyph, int32_t x, int32_t y, Rect *bounds) {
161 void Font::renderUTF(const char *text, uint32_t len, int32_t x, int32_t y,
169 if (mode == Font::MEASURE) {
225 Font::CachedGlyphInfo* Font::getCachedUTFChar(int32_t utfChar) {
239 void Font::updateGlyphCache(CachedGlyphInfo *glyph) {
258 // Let the font state figure out where to put the bitmap
284 Font::CachedGlyphInfo *Font::cacheGlyph(uint32_t glyph) {
296 Font * Font::create(Context *rsc, const char *name, float fontSize, uint32_t dpi,
299 Vector<Font*> &activeFonts = rsc->mStateFont.mActiveFonts;
302 Font *ithFont = activeFonts[i];
308 Font *newFont = new Font(rsc);
320 Font::~Font() {
419 ALOGE("Font size to large to fit in cache. width, height = %i, %i", (int)bitmap->width, (int)bitmap->rows);
736 void FontState::precacheLatin(Font *font) {
742 font->getCachedUTFChar((int32_t)mLatinPrecache[precacheIdx]);
751 Font::RenderMode mode,
752 Font::Rect *bounds,
757 Font *currentFont = mRSC->getFont();
765 mDefault.set(Font::create(mRSC, fullPath, 8, mRSC->getDPI()));
787 void FontState::measureText(const char *text, uint32_t len, Font::Rect *bounds) {
788 renderText(text, len, 0, 0, 0, -1, Font::MEASURE, bounds);
867 Font *newFont = Font::create(rsc, name, fontSize, dpi);
878 Font *newFont = Font::create(rsc, name, fontSize, dpi, data, data_length);