| OLD | NEW |
| 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 #include "SkTypes.h" | 8 #include "SkTypes.h" |
| 9 #if defined(SK_BUILD_FOR_WIN32) | 9 #if defined(SK_BUILD_FOR_WIN32) |
| 10 | 10 |
| (...skipping 2158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2169 // Try a run of non-bmp. | 2169 // Try a run of non-bmp. |
| 2170 while (glyphIndex < glyphCount && utf32[glyphIndex] > 0xFFFF) { | 2170 while (glyphIndex < glyphCount && utf32[glyphIndex] > 0xFFFF) { |
| 2171 SkUTF16_FromUnichar(utf32[glyphIndex], reinterpret_cast<uint16_t
*>(scratch)); | 2171 SkUTF16_FromUnichar(utf32[glyphIndex], reinterpret_cast<uint16_t
*>(scratch)); |
| 2172 glyphs[glyphIndex] = nonBmpCharToGlyph(hdc, &sc, scratch); | 2172 glyphs[glyphIndex] = nonBmpCharToGlyph(hdc, &sc, scratch); |
| 2173 ++glyphIndex; | 2173 ++glyphIndex; |
| 2174 } | 2174 } |
| 2175 } | 2175 } |
| 2176 break; | 2176 break; |
| 2177 } | 2177 } |
| 2178 default: | 2178 default: |
| 2179 SK_ABORT("Invalid Text Encoding"); | 2179 SK_CRASH(); |
| 2180 } | 2180 } |
| 2181 | 2181 |
| 2182 if (sc) { | 2182 if (sc) { |
| 2183 ::ScriptFreeCache(&sc); | 2183 ::ScriptFreeCache(&sc); |
| 2184 } | 2184 } |
| 2185 | 2185 |
| 2186 for (int i = 0; i < glyphCount; ++i) { | 2186 for (int i = 0; i < glyphCount; ++i) { |
| 2187 if (0 == glyphs[i]) { | 2187 if (0 == glyphs[i]) { |
| 2188 return i; | 2188 return i; |
| 2189 } | 2189 } |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2508 | 2508 |
| 2509 private: | 2509 private: |
| 2510 SkTDArray<ENUMLOGFONTEX> fLogFontArray; | 2510 SkTDArray<ENUMLOGFONTEX> fLogFontArray; |
| 2511 }; | 2511 }; |
| 2512 | 2512 |
| 2513 /////////////////////////////////////////////////////////////////////////////// | 2513 /////////////////////////////////////////////////////////////////////////////// |
| 2514 | 2514 |
| 2515 SkFontMgr* SkFontMgr_New_GDI() { return new SkFontMgrGDI; } | 2515 SkFontMgr* SkFontMgr_New_GDI() { return new SkFontMgrGDI; } |
| 2516 | 2516 |
| 2517 #endif//defined(SK_BUILD_FOR_WIN32) | 2517 #endif//defined(SK_BUILD_FOR_WIN32) |
| OLD | NEW |