pub fn pair(&mut self, glyph: u16, codepoint: char) {
        self.mappings.push(b'<');
        self.mappings.push_hex_u16(glyph);
        self.mappings.extend(b"> <");

        let mut utf16 = [0u16; 2];
        for &mut part in codepoint.encode_utf16(&mut utf16) {
            self.mappings.push_hex_u16(part);
        }

        self.mappings.extend(b">\n");
        self.count += 1;

        // At most 100 lines per range.
        if self.count >= 100 {
            self.flush_range();
        }
    }
/// Add a mapping from a glyph ID to a unicode codepoint.
Add a mapping from a glyph ID to a unicode codepoint.
Add a mapping from a glyph ID to a unicode codepoint .
pub fn pair(&mut self, glyph: u16, codepoint: char) {
        self.mappings.push(b'<');
        self.mappings.push_hex_u16(glyph);
        self.mappings.extend(b"> <");
        let mut utf16 = [0u16; 2];
        for &mut part in codepoint.encode_utf16(&mut utf16) {
            self.mappings.push_hex_u16(part);
        }
        self.mappings.extend(b">\n");
        self.count += 1;
        // At most 100 lines per range.
        if self.count >= 100 {
            self.flush_range();
        }
    }
pub fn pair ( & mut self , glyph : u16 , codepoint : char ) { self . mappings . push ( b'<' ) ; self . mappings . push_hex_u16 ( glyph ) ; self . mappings . extend ( b" " ) ; let mut utf16 = [ 0u16 ; 2 ] ; for & mut part in codepoint . encode_utf16 ( & mut utf16 ) { self . mappings . push_hex_u16 ( part ) ; } self . mappings . extend ( b" \n " ) ; self . count += 1 ; // At most 100 lines per range. if self . count >= 100 { self . flush_range ( ) ; } }
Add a mapping from a glyph ID to a unicode codepoint.
Add a mapping from a glyph ID to a unicode codepoint .
&mut self
glyph
u16
codepoint
char
&mut self
glyph
u16
codepoint
char