Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(449)

Side by Side Diff: src/core/SkScalerContext.h

Issue 411313002: Colored Emoji not drawn in Chrome if font style is set as Bold (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixing typo error Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/ports/SkFontHost_FreeType.cpp » ('j') | src/ports/SkFontHost_FreeType.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkScalerContext_DEFINED 8 #ifndef SkScalerContext_DEFINED
9 #define SkScalerContext_DEFINED 9 #define SkScalerContext_DEFINED
10 10
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 * If there is no 1:1 mapping from the unichar to a glyph id, returns 0. 259 * If there is no 1:1 mapping from the unichar to a glyph id, returns 0.
260 */ 260 */
261 virtual uint16_t generateCharToGlyph(SkUnichar unichar) = 0; 261 virtual uint16_t generateCharToGlyph(SkUnichar unichar) = 0;
262 262
263 /** Returns the unichar for the given glyph id. 263 /** Returns the unichar for the given glyph id.
264 * If there is no 1:1 mapping from the glyph id to a unichar, returns 0. 264 * If there is no 1:1 mapping from the glyph id to a unichar, returns 0.
265 * The default implementation always returns 0, indicating failure. 265 * The default implementation always returns 0, indicating failure.
266 */ 266 */
267 virtual SkUnichar generateGlyphToChar(uint16_t glyphId); 267 virtual SkUnichar generateGlyphToChar(uint16_t glyphId);
268 268
269 /** In case of Bitmap font like Colored Emoji font we need to disable
270 * fGenerateImageFromPath as generating image from path is not possible.
271 */
272 void updateImageFromPath(bool value) { fGenerateImageFromPath = value; }
reed1 2014/09/05 13:29:42 can we combine these two, and only have one method
h.joshi 2014/09/05 14:06:31 Done.
273
269 void forceGenerateImageFromPath() { fGenerateImageFromPath = true; } 274 void forceGenerateImageFromPath() { fGenerateImageFromPath = true; }
270 275
271 private: 276 private:
272 // never null 277 // never null
273 SkAutoTUnref<SkTypeface> fTypeface; 278 SkAutoTUnref<SkTypeface> fTypeface;
274 279
275 #ifdef SK_BUILD_FOR_ANDROID 280 #ifdef SK_BUILD_FOR_ANDROID
276 SkPaintOptionsAndroid fPaintOptionsAndroid; 281 SkPaintOptionsAndroid fPaintOptionsAndroid;
277 #endif 282 #endif
278 283
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 return static_cast<SkPaint::Hinting>(hint); 354 return static_cast<SkPaint::Hinting>(hint);
350 } 355 }
351 356
352 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { 357 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) {
353 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | 358 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) |
354 (hinting << SkScalerContext::kHinting_Shift); 359 (hinting << SkScalerContext::kHinting_Shift);
355 } 360 }
356 361
357 362
358 #endif 363 #endif
OLDNEW
« no previous file with comments | « no previous file | src/ports/SkFontHost_FreeType.cpp » ('j') | src/ports/SkFontHost_FreeType.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698