OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 2 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
3 * | 3 * |
4 * This is part of HarfBuzz, an OpenType Layout engine library. | 4 * This is part of HarfBuzz, an OpenType Layout engine library. |
5 * | 5 * |
6 * Permission is hereby granted, without written agreement and without | 6 * Permission is hereby granted, without written agreement and without |
7 * license or royalty fees, to use, copy, modify, and distribute this | 7 * license or royalty fees, to use, copy, modify, and distribute this |
8 * software and its documentation for any purpose, provided that the | 8 * software and its documentation for any purpose, provided that the |
9 * above copyright notice and the following two paragraphs appear in | 9 * above copyright notice and the following two paragraphs appear in |
10 * all copies of this software. | 10 * all copies of this software. |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 const HB_UChar16 *str = item->string + item->item.pos; | 106 const HB_UChar16 *str = item->string + item->item.pos; |
107 int len = item->item.length; | 107 int len = item->item.length; |
108 #ifndef NO_OPENTYPE | 108 #ifndef NO_OPENTYPE |
109 const int availableGlyphs = item->num_glyphs; | 109 const int availableGlyphs = item->num_glyphs; |
110 #endif | 110 #endif |
111 HB_Bool haveGlyphs; | 111 HB_Bool haveGlyphs; |
112 HB_STACKARRAY(HB_UChar16, reordered, len + 4); | 112 HB_STACKARRAY(HB_UChar16, reordered, len + 4); |
113 | 113 |
114 if (item->num_glyphs < item->item.length + 4) { | 114 if (item->num_glyphs < item->item.length + 4) { |
115 item->num_glyphs = item->item.length + 4; | 115 item->num_glyphs = item->item.length + 4; |
| 116 HB_FREE_STACKARRAY(reordered); |
116 return FALSE; | 117 return FALSE; |
117 } | 118 } |
118 | 119 |
119 if (invalid) { | 120 if (invalid) { |
120 *reordered = 0x25cc; | 121 *reordered = 0x25cc; |
121 memcpy(reordered+1, str, len*sizeof(HB_UChar16)); | 122 memcpy(reordered+1, str, len*sizeof(HB_UChar16)); |
122 len++; | 123 len++; |
123 str = reordered; | 124 str = reordered; |
124 } | 125 } |
125 | 126 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 while (i < boundary) { | 266 while (i < boundary) { |
266 attributes[i].charStop = FALSE; | 267 attributes[i].charStop = FALSE; |
267 ++uc; | 268 ++uc; |
268 ++i; | 269 ++i; |
269 } | 270 } |
270 assert(i == boundary); | 271 assert(i == boundary); |
271 } | 272 } |
272 } | 273 } |
273 | 274 |
274 | 275 |
OLD | NEW |