• Home
  • Raw
  • Download

Lines Matching refs:glyph

92 void Font::drawCachedGlyph(CachedGlyphInfo *glyph, int32_t x, int32_t y) {  in drawCachedGlyph()  argument
95 int32_t nPenX = x + glyph->mBitmapLeft; in drawCachedGlyph()
96 int32_t nPenY = y - glyph->mBitmapTop + glyph->mBitmapHeight; in drawCachedGlyph()
98 float u1 = glyph->mBitmapMinU; in drawCachedGlyph()
99 float u2 = glyph->mBitmapMaxU; in drawCachedGlyph()
100 float v1 = glyph->mBitmapMinV; in drawCachedGlyph()
101 float v2 = glyph->mBitmapMaxV; in drawCachedGlyph()
103 int32_t width = (int32_t) glyph->mBitmapWidth; in drawCachedGlyph()
104 int32_t height = (int32_t) glyph->mBitmapHeight; in drawCachedGlyph()
112 void Font::drawCachedGlyph(CachedGlyphInfo* glyph, int32_t x, int32_t y, in drawCachedGlyph() argument
114 int32_t nPenX = x + glyph->mBitmapLeft; in drawCachedGlyph()
115 int32_t nPenY = y + glyph->mBitmapTop; in drawCachedGlyph()
117 uint32_t endX = glyph->mBitmapMinX + glyph->mBitmapWidth; in drawCachedGlyph()
118 uint32_t endY = glyph->mBitmapMinY + glyph->mBitmapHeight; in drawCachedGlyph()
126 for (cacheX = glyph->mBitmapMinX, bX = nPenX; cacheX < endX; cacheX++, bX++) { in drawCachedGlyph()
127 for (cacheY = glyph->mBitmapMinY, bY = nPenY; cacheY < endY; cacheY++, bY++) { in drawCachedGlyph()
138 void Font::measureCachedGlyph(CachedGlyphInfo *glyph, int32_t x, int32_t y, Rect *bounds) { in measureCachedGlyph() argument
139 int32_t nPenX = x + glyph->mBitmapLeft; in measureCachedGlyph()
140 int32_t nPenY = y - glyph->mBitmapTop + glyph->mBitmapHeight; in measureCachedGlyph()
142 int32_t width = (int32_t) glyph->mBitmapWidth; in measureCachedGlyph()
143 int32_t height = (int32_t) glyph->mBitmapHeight; in measureCachedGlyph()
238 void Font::updateGlyphCache(CachedGlyphInfo *glyph) { in updateGlyphCache() argument
240 FT_Error error = FT_Load_Glyph( mFace, glyph->mGlyphIndex, FT_LOAD_RENDER ); in updateGlyphCache()
246 glyph->mAdvanceX = mFace->glyph->advance.x; in updateGlyphCache()
247 glyph->mAdvanceY = mFace->glyph->advance.y; in updateGlyphCache()
248 glyph->mBitmapLeft = mFace->glyph->bitmap_left; in updateGlyphCache()
249 glyph->mBitmapTop = mFace->glyph->bitmap_top; in updateGlyphCache()
251 FT_Bitmap *bitmap = &mFace->glyph->bitmap; in updateGlyphCache()
259 glyph->mIsValid = state->cacheBitmap(bitmap, &startX, &startY); in updateGlyphCache()
261 if (!glyph->mIsValid) { in updateGlyphCache()
268 glyph->mBitmapMinX = startX; in updateGlyphCache()
269 glyph->mBitmapMinY = startY; in updateGlyphCache()
270 glyph->mBitmapWidth = bitmap->width; in updateGlyphCache()
271 glyph->mBitmapHeight = bitmap->rows; in updateGlyphCache()
276 glyph->mBitmapMinU = (float)startX / (float)cacheWidth; in updateGlyphCache()
277 glyph->mBitmapMinV = (float)startY / (float)cacheHeight; in updateGlyphCache()
278 glyph->mBitmapMaxU = (float)endX / (float)cacheWidth; in updateGlyphCache()
279 glyph->mBitmapMaxV = (float)endY / (float)cacheHeight; in updateGlyphCache()
283 Font::CachedGlyphInfo *Font::cacheGlyph(uint32_t glyph) { in cacheGlyph() argument
285 mCachedGlyphs.add(glyph, newGlyph); in cacheGlyph()
287 newGlyph->mGlyphIndex = FT_Get_Char_Index(mFace, glyph); in cacheGlyph()
327 CachedGlyphInfo *glyph = mCachedGlyphs.valueAt(i); in ~Font() local
328 delete glyph; in ~Font()