Lines Matching refs:uni
241 size_t SkUTF8_FromUnichar(SkUnichar uni, char utf8[]) {
242 if ((uint32_t)uni > 0x10FFFF) {
247 if (uni <= 127) {
249 *utf8 = (char)uni;
258 SkDEBUGCODE(SkUnichar orig = uni;)
260 while (uni > 0x7F >> count) {
261 *p++ = (char)(0x80 | (uni & 0x3F));
262 uni >>= 6;
272 *--utf8 = (char)(~(0xFF >> count) | uni);
350 size_t SkUTF16_FromUnichar(SkUnichar uni, uint16_t dst[]) {
351 SkASSERT((unsigned)uni <= 0x10FFFF);
353 int extra = (uni > 0xFFFF);
357 // dst[0] = SkToU16(0xD800 | ((uni - 0x10000) >> 10));
358 // dst[0] = SkToU16(0xD800 | ((uni >> 10) - 64));
359 dst[0] = SkToU16((0xD800 - 64) + (uni >> 10));
360 dst[1] = SkToU16(0xDC00 | (uni & 0x3FF));
365 dst[0] = SkToU16(uni);