| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 fDWriteFontFace->GetGlyphIndices(scratch, limit, &glyphs[baseGlyph])
; | 104 fDWriteFontFace->GetGlyphIndices(scratch, limit, &glyphs[baseGlyph])
; |
| 105 } | 105 } |
| 106 break; | 106 break; |
| 107 } | 107 } |
| 108 case SkTypeface::kUTF32_Encoding: { | 108 case SkTypeface::kUTF32_Encoding: { |
| 109 const UINT32* utf32 = reinterpret_cast<const UINT32*>(chars); | 109 const UINT32* utf32 = reinterpret_cast<const UINT32*>(chars); |
| 110 fDWriteFontFace->GetGlyphIndices(utf32, glyphCount, glyphs); | 110 fDWriteFontFace->GetGlyphIndices(utf32, glyphCount, glyphs); |
| 111 break; | 111 break; |
| 112 } | 112 } |
| 113 default: | 113 default: |
| 114 SK_CRASH(); | 114 SK_ABORT("Invalid Text Encoding"); |
| 115 } | 115 } |
| 116 | 116 |
| 117 for (int i = 0; i < glyphCount; ++i) { | 117 for (int i = 0; i < glyphCount; ++i) { |
| 118 if (0 == glyphs[i]) { | 118 if (0 == glyphs[i]) { |
| 119 return i; | 119 return i; |
| 120 } | 120 } |
| 121 } | 121 } |
| 122 return glyphCount; | 122 return glyphCount; |
| 123 } | 123 } |
| 124 | 124 |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 glyphCount, | 455 glyphCount, |
| 456 glyphIDs, | 456 glyphIDs, |
| 457 glyphIDsCount, | 457 glyphIDsCount, |
| 458 getWidthAdvance)); | 458 getWidthAdvance)); |
| 459 } | 459 } |
| 460 } | 460 } |
| 461 | 461 |
| 462 return info; | 462 return info; |
| 463 } | 463 } |
| 464 #endif//defined(SK_BUILD_FOR_WIN32) | 464 #endif//defined(SK_BUILD_FOR_WIN32) |
| OLD | NEW |