Lines Matching refs:font
538 status_t BootAnimation::initFont(Font* font, const char* fallback) { in initFont() argument
541 if (font->map != nullptr) { in initFont()
542 glGenTextures(1, &font->texture.name); in initFont()
543 glBindTexture(GL_TEXTURE_2D, font->texture.name); in initFont()
545 status = initTexture(font->map, &font->texture.w, &font->texture.h); in initFont()
552 status = initTexture(&font->texture, mAssets, fallback); in initFont()
558 font->char_width = font->texture.w / FONT_NUM_COLS; in initFont()
559 font->char_height = font->texture.h / FONT_NUM_ROWS / 2; // There are bold and regular rows in initFont()
565 void BootAnimation::drawText(const char* str, const Font& font, bool bold, int* x, int* y) { in drawText() argument
567 glBindTexture(GL_TEXTURE_2D, font.texture.name); in drawText()
570 const int strWidth = font.char_width * len; in drawText()
578 *y = (mHeight - font.char_height) / 2; in drawText()
580 *y = mHeight + *y - font.char_height; in drawText()
583 int cropRect[4] = { 0, 0, font.char_width, -font.char_height }; in drawText()
596 cropRect[0] = col * font.char_width; // Left of column in drawText()
597 cropRect[1] = row * font.char_height * 2; // Top of row in drawText()
599 cropRect[1] += bold ? 2 * font.char_height : font.char_height; in drawText()
602 glDrawTexiOES(*x, *y, 0, font.char_width, font.char_height); in drawText()
604 *x += font.char_width; in drawText()
612 void BootAnimation::drawClock(const Font& font, const int xPos, const int yPos) { in drawClock() argument
634 drawText(out, font, false, &x, &y); in drawClock()