| 172 | } |
| 173 | |
| 174 | static uint32_t hex_num(const unsigned char *s, size_t n) { |
| 175 | uint32_t v = 0; |
| 176 | for (size_t i = 0; i < n; i++) { |
| 177 | unsigned char c = s[i]; |
| 178 | uint32_t x = c <= '9' ? (uint32_t)(c - '0') : (uint32_t)((c | 0x20) - 'a' + 10); |
| 179 | v = v * 16 + x; |
| 180 | } |
| 181 | return v; |
| 182 | } |
| 183 | |
| 184 | static const char *g2u(pdf_doc_t *d, const unsigned char *name, size_t n, int depth) { |
| 185 | const char *r = glyph_lookup(name, n); |