function shapeWithTrace(font, buffer, features, stop_at, stop_phase) {
    var bufLen = 1024 * 1024;
    var traceBuffer = exports.malloc(bufLen);
    var featurestr = createCString(features);
    var traceLen = exports.hbjs_shape_with_trace(font.ptr, buffer.ptr, featurestr.ptr, stop_at, stop_phase, traceBuffer, bufLen);
    featurestr.free();
    var trace = utf8Decoder.decode(heapu8.subarray(traceBuffer, traceBuffer + traceLen - 1));
    exports.free(traceBuffer);
    return JSON.parse(trace);
  }
/**
  * Shape a buffer with a given font, returning a JSON trace of the shaping process.
  *
  * This function supports "partial shaping", where the shaping process is
  * terminated after a given lookup ID is reached. If the user requests the function
  * to terminate shaping after an ID in the GSUB phase, GPOS table lookups will be
  * processed as normal.
  *
  * @param {object} font: A font returned from `createFont`
  * @param {object} buffer: A buffer returned from `createBuffer` and suitably
  *   prepared.
  * @param {object} features: A dictionary of OpenType features to apply.
  * @param {number} stop_at: A lookup ID at which to terminate shaping.
  * @param {number} stop_phase: Either 0 (don't terminate shaping), 1 (`stop_at`
      refers to a lookup ID in the GSUB table), 2 (`stop_at` refers to a lookup
      ID in the GPOS table).
  */
Shape a buffer with a given font, returning a JSON trace of the shaping process.
This function supports "partial shaping", where the shaping process is
terminated after a given lookup ID is reached. If the user requests the function
to terminate shaping after an ID in the GSUB phase, GPOS table lookups will be
processed as normal.

@param {object} font: A font returned from `createFont`
@param {object} buffer: A buffer returned from `createBuffer` and suitably
prepared.
@param {object} features: A dictionary of OpenType features to apply.
@param {number} stop_at: A lookup ID at which to terminate shaping.
@param {number} stop_phase: Either 0 (don't terminate shaping), 1 (`stop_at`
refers to a lookup ID in the GSUB table), 2 (`stop_at` refers to a lookup
ID in the GPOS table).
Shape a buffer with a given font returning a JSON trace of the shaping process . This function supports " partial shaping " where the shaping process is terminated after a given lookup ID is reached . If the user requests the function to terminate shaping after an ID in the GSUB phase GPOS table lookups will be processed as normal . @param { object } font : A font returned from ` createFont ` @param { object } buffer : A buffer returned from ` createBuffer ` and suitably prepared . @param { object } features : A dictionary of OpenType features to apply . @param { number } stop_at : A lookup ID at which to terminate shaping . @param { number } stop_phase : Either 0 ( don ' t terminate shaping ) 1 ( ` stop_at ` refers to a lookup ID in the GSUB table ) 2 ( ` stop_at ` refers to a lookup ID in the GPOS table ) .
function shapeWithTrace(font, buffer, features, stop_at, stop_phase) {
    var bufLen = 1024 * 1024;
    var traceBuffer = exports.malloc(bufLen);
    var featurestr = createCString(features);
    var traceLen = exports.hbjs_shape_with_trace(font.ptr, buffer.ptr, featurestr.ptr, stop_at, stop_phase, traceBuffer, bufLen);
    featurestr.free();
    var trace = utf8Decoder.decode(heapu8.subarray(traceBuffer, traceBuffer + traceLen - 1));
    exports.free(traceBuffer);
    return JSON.parse(trace);
  }
function shapeWithTrace ( font , buffer , features , stop_at , stop_phase ) { var bufLen = 1024 * 1024 ; var traceBuffer = exports . malloc ( bufLen ) ; var featurestr = createCString ( features ) ; var traceLen = exports . hbjs_shape_with_trace ( font . ptr , buffer . ptr , featurestr . ptr , stop_at , stop_phase , traceBuffer , bufLen ) ; featurestr . free ( ) ; var trace = utf8Decoder . decode ( heapu8 . subarray ( traceBuffer , traceBuffer + traceLen - 1 ) ) ; exports . free ( traceBuffer ) ; return JSON . parse ( trace ) ; }
Shape a buffer with a given font, returning a JSON trace of the shaping process.
Shape a buffer with a given font returning a JSON trace of the shaping process .