function centerScaleGlyph(glyph, baseline, scaleFactor) {
  let filter;
  const k = scaleFactor;
  if (k >= 1) filter = PostFilters.translation(0, 0);
  else {
    const scaleFilter = PostFilters.scaling(k);
    const translateFilter = PostFilters.translation(
      0, (500-120)*(1-k) + 120 - baseline);
    filter = PostFilters.merge(scaleFilter, translateFilter);
  }

  return {
    advanceWidth: Math.round(glyph.advanceWidth * scaleFactor),
    advanceHeight: glyph.advanceHeight,
    verticalOrigin: glyph.verticalOrigin + 120 - Math.round(baseline),
    contours: PostFilters.round()(filter(glyph.contours))
  };
}
Center-scale glyph transforms
@param { Glyph } glyph 
@param { number } baseline
@param { number } scaleFactor
@returns { Glyph }