OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "../../../include/fxge/fx_freetype.h" | 7 #include "../../../include/fxge/fx_freetype.h" |
8 #include "../../../../third_party/freetype/src/psnames/pstables.h" | 8 #include "third_party/freetype/src/psnames/pstables.h" |
9 | 9 |
10 static int xyq_search_node(char* glyph_name, int name_offset, int table_offset,
wchar_t unicode) | 10 static int xyq_search_node(char* glyph_name, int name_offset, int table_offset,
wchar_t unicode) |
11 { | 11 { |
12 int i, count; | 12 int i, count; |
13 | 13 |
14 // copy letters | 14 // copy letters |
15 while (1) { | 15 while (1) { |
16 glyph_name[name_offset] = ft_adobe_glyph_list[table_offset] & 0x7f; | 16 glyph_name[name_offset] = ft_adobe_glyph_list[table_offset] & 0x7f; |
17 name_offset++; | 17 name_offset++; |
18 table_offset++; | 18 table_offset++; |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 count = ft_adobe_glyph_list[1]; | 173 count = ft_adobe_glyph_list[1]; |
174 for (i = 0; i < count; i++) { | 174 for (i = 0; i < count; i++) { |
175 int child_offset = ft_adobe_glyph_list[i * 2 + 2] * 256 + ft_adobe_glyph
_list[i * 2 + 3]; | 175 int child_offset = ft_adobe_glyph_list[i * 2 + 2] * 256 + ft_adobe_glyph
_list[i * 2 + 3]; |
176 if (xyq_search_node(glyph_name, 0, child_offset, unicode)) | 176 if (xyq_search_node(glyph_name, 0, child_offset, unicode)) |
177 return; | 177 return; |
178 } | 178 } |
179 | 179 |
180 // failed, clear the buffer | 180 // failed, clear the buffer |
181 glyph_name[0] = 0; | 181 glyph_name[0] = 0; |
182 } | 182 } |
OLD | NEW |