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

Side by Side Diff: Source/platform/fonts/win/FontCacheSkiaWin.cpp

Issue 326763002: Adding WebFallbackFont and renaming SimpleFontFamily (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing mac build Created 6 years, 6 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 | « Source/platform/fonts/skia/FontCacheSkia.cpp ('k') | public/platform/linux/WebFallbackFont.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007 Apple Computer, Inc. 2 * Copyright (C) 2006, 2007 Apple Computer, Inc.
3 * Copyright (c) 2006, 2007, 2008, 2009, 2012 Google Inc. All rights reserved. 3 * Copyright (c) 2006, 2007, 2008, 2009, 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 fontData->setupPaint(&paint); 78 fontData->setupPaint(&paint);
79 paint.setTextEncoding(SkPaint::kUTF32_TextEncoding); 79 paint.setTextEncoding(SkPaint::kUTF32_TextEncoding);
80 80
81 uint16_t glyph; 81 uint16_t glyph;
82 paint.textToGlyphs(&character, sizeof(character), &glyph); 82 paint.textToGlyphs(&character, sizeof(character), &glyph);
83 return glyph; 83 return glyph;
84 } 84 }
85 85
86 // Given the desired base font, this will create a SimpleFontData for a specific 86 // Given the desired base font, this will create a SimpleFontData for a specific
87 // font that can be used to render the given range of characters. 87 // font that can be used to render the given range of characters.
88 PassRefPtr<SimpleFontData> FontCache::platformFallbackForCharacter(const FontDes cription& fontDescription, UChar32 character, const SimpleFontData*) 88 PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter(const FontDescrip tion& fontDescription, UChar32 character, const SimpleFontData*)
89 { 89 {
90 // FIXME: Consider passing fontDescription.dominantScript() 90 // FIXME: Consider passing fontDescription.dominantScript()
91 // to GetFallbackFamily here. 91 // to GetFallbackFamily here.
92 UScriptCode script; 92 UScriptCode script;
93 const wchar_t* family = getFallbackFamily(character, 93 const wchar_t* family = getFallbackFamily(character,
94 fontDescription.genericFamily(), 94 fontDescription.genericFamily(),
95 &script, 95 &script,
96 m_fontManager.get()); 96 m_fontManager.get());
97 FontPlatformData* data = 0; 97 FontPlatformData* data = 0;
98 if (family) 98 if (family)
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 fontSize, 222 fontSize,
223 fontDescription.weight() >= FontWeightBold && !tf->isBold() || fontDescr iption.isSyntheticBold(), 223 fontDescription.weight() >= FontWeightBold && !tf->isBold() || fontDescr iption.isSyntheticBold(),
224 fontDescription.style() == FontStyleItalic && !tf->isItalic() || fontDes cription.isSyntheticItalic(), 224 fontDescription.style() == FontStyleItalic && !tf->isItalic() || fontDes cription.isSyntheticItalic(),
225 fontDescription.orientation(), 225 fontDescription.orientation(),
226 s_useSubpixelPositioning); 226 s_useSubpixelPositioning);
227 227
228 return result; 228 return result;
229 } 229 }
230 230
231 } 231 }
OLDNEW
« no previous file with comments | « Source/platform/fonts/skia/FontCacheSkia.cpp ('k') | public/platform/linux/WebFallbackFont.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698