Lines Matching defs:glyph
50 bool RandomScalerContext::generateAdvance(SkGlyph* glyph) { return fProxy->generateAdvance(glyph); }
52 void RandomScalerContext::generateMetrics(SkGlyph* glyph) {
53 // Here we will change the mask format of the glyph
56 switch (glyph->getGlyphID() % 4) {
63 *glyph = fProxy->internalMakeGlyph(glyph->getPackedID(), format);
65 if (fFakeIt || (glyph->getGlyphID() % 4) != 2) {
70 if (!fProxy->getPath(glyph->getPackedID(), &path)) {
73 glyph->fMaskFormat = SkMask::kARGB32_Format;
81 glyph->fLeft = ibounds.fLeft;
82 glyph->fTop = ibounds.fTop;
83 glyph->fWidth = ibounds.width();
84 glyph->fHeight = ibounds.height();
87 void RandomScalerContext::generateImage(const SkGlyph& glyph) {
90 SkMask::Format format = (SkMask::Format)glyph.fMaskFormat;
91 switch (glyph.getGlyphID() % 4) {
97 const_cast<SkGlyph&>(glyph).fMaskFormat = format;
101 sk_bzero(glyph.fImage, glyph.imageSize());
105 if (SkMask::kARGB32_Format != glyph.fMaskFormat) {
106 fProxy->getImage(glyph);
110 // If the format is ARGB, just draw the glyph from path.
112 if (!fProxy->getPath(glyph.getPackedID(), &path)) {
113 fProxy->getImage(glyph);
118 bm.installPixels(SkImageInfo::MakeN32Premul(glyph.fWidth, glyph.fHeight),
119 glyph.fImage,
120 glyph.rowBytes());
124 canvas.translate(-SkIntToScalar(glyph.fLeft), -SkIntToScalar(glyph.fTop));
128 bool RandomScalerContext::generatePath(SkGlyphID glyph, SkPath* path) {
129 return fProxy->generatePath(glyph, path);