lib/parse/glyf.js
function parseGlyphCoordinate(p, flag, previousValue, shortVectorBitMask, sameBitMask) {
    var v;
    if ((flag & shortVectorBitMask) > 0) {
        // The coordinate is 1 byte long.
        v = p.parseByte();
        // The `same` bit is re-used for short values to signify the sign of the value.
        if ((flag & sameBitMask) === 0) {
            v = -v;
        }
        v = previousValue + v;
    } else {
        //  The coordinate is 2 bytes long.
        // If the `same` bit is set, the coordinate is the same as the previous coordinate.
        if ((flag & sameBitMask) > 0) {
            v = previousValue;
        } else {
            // Parse the coordinate as a signed 16-bit delta value.
            v = previousValue + p.parseShort();
        }
    }
    return v;
}
function parseGlyphCoordinate(p, flag, previousValue, shortVectorBitMask, sameBitMask) {
    var v;
    if ((flag & shortVectorBitMask) > 0) {
        // The coordinate is 1 byte long.
        v = p.parseByte();
        // The `same` bit is re-used for short values to signify the sign of the value.
        if ((flag & sameBitMask) === 0) {
            v = -v;
        }
        v = previousValue + v;
    } else {
        //  The coordinate is 2 bytes long.
        // If the `same` bit is set, the coordinate is the same as the previous coordinate.
        if ((flag & sameBitMask) > 0) {
            v = previousValue;
        } else {
            // Parse the coordinate as a signed 16-bit delta value.
            v = previousValue + p.parseShort();
        }
    }
    return v;
}
function parseGlyphCoordinate ( p , flag , previousValue , shortVectorBitMask , sameBitMask ) { var v ; if ( ( flag & shortVectorBitMask ) > 0 ) { // The coordinate is 1 byte long. v = p . parseByte ( ) ; // The `same` bit is re-used for short values to signify the sign of the value. if ( ( flag & sameBitMask ) === 0 ) { v = - v ; } v = previousValue + v ; } else { //  The coordinate is 2 bytes long. // If the `same` bit is set, the coordinate is the same as the previous coordinate. if ( ( flag & sameBitMask ) > 0 ) { v = previousValue ; } else { // Parse the coordinate as a signed 16-bit delta value. v = previousValue + p . parseShort ( ) ; } } return v ; }
Parse the coordinate data for a glyph.
Parse the coordinate data for a glyph .