Home | History | Annotate | Download | only in fonts

Lines Matching refs:glyph

122 void SkTestTypeface::getAdvance(SkGlyph* glyph) {
123 glyph->fAdvanceX = fTestFont->fWidths[glyph->getGlyphID()];
124 glyph->fAdvanceY = 0;
131 void SkTestTypeface::getMetrics(SkGlyph* glyph) {
132 glyph->fAdvanceX = fTestFont->fWidths[glyph->getGlyphID()];
133 glyph->fAdvanceY = 0;
136 void SkTestTypeface::getPath(const SkGlyph& glyph, SkPath* path) {
137 *path = *fTestFont->fPaths[glyph.getGlyphID()];
201 uint16_t glyph;
202 (void) fFace->onCharsToGlyphs((const void *) &uni, SkTypeface::kUTF16_Encoding, &glyph, 1);
203 return glyph;
206 void generateAdvance(SkGlyph* glyph) override {
207 fFace->getAdvance(glyph);
209 const SkVector advance = fMatrix.mapXY(SkFixedToScalar(glyph->fAdvanceX),
210 SkFixedToScalar(glyph->fAdvanceY));
211 glyph->fAdvanceX = SkScalarToFixed(advance.fX);
212 glyph->fAdvanceY = SkScalarToFixed(advance.fY);
215 void generateMetrics(SkGlyph* glyph) override {
216 fFace->getMetrics(glyph);
218 const SkVector advance = fMatrix.mapXY(SkFixedToScalar(glyph->fAdvanceX),
219 SkFixedToScalar(glyph->fAdvanceY));
220 glyph->fAdvanceX = SkScalarToFixed(advance.fX);
221 glyph->fAdvanceY = SkScalarToFixed(advance.fY);
224 fFace->getPath(*glyph, &path);
234 glyph->fLeft = ibounds.fLeft;
235 glyph->fTop = ibounds.fTop;
236 glyph->fWidth = ibounds.width();
237 glyph->fHeight = ibounds.height();
240 void generateImage(const SkGlyph& glyph) override {
242 fFace->getPath(glyph, &path);
245 bm.installPixels(SkImageInfo::MakeN32Premul(glyph.fWidth, glyph.fHeight),
246 glyph.fImage, glyph.rowBytes());
250 canvas.translate(-SkIntToScalar(glyph.fLeft),
251 -SkIntToScalar(glyph.fTop));
258 void generatePath(const SkGlyph& glyph, SkPath* path) override {
259 fFace->getPath(glyph, path);