def run_harfbuzz_on_text(text, font_file_name, language, extra_parameters=None):
    """Runs HarfBuzz on input text and return JSON shaping information."""
    hb_parameters = [
        HB_SHAPE_PATH,
        '--output-format=json',
        '--no-glyph-names',  # Some fonts have empty glyph names
        font_file_name % '--font-file=%s']

    if language:
        hb_parameters.append('--language=%s' % language)

    if extra_parameters is not None:
        hb_parameters += extra_parameters

    hb_process = subprocess.Popen(
        hb_parameters,
        stdin=subprocess.PIPE,
        stdout=subprocess.PIPE)

    return hb_process.communicate(input=text.encode('UTF-8'))[0]
dataset/ETHPy150Open googlei18n/nototools/nototools/render.py/run_harfbuzz_on_text/swapped operands of `%`