def build_slide(filename: Path, pptx_template: Path, master_slide_idx: int, slide_layout_idx: int, font_size: int,
                dst_dir: Path, font_name: str, slide_txt_alignment: str = "left") -> Path:
    """Builds a powerpoint presentation using data read from a yaml file

    :param filename: path to the yaml file 
    :param pptx_template: path to powerpoint template
    :param master_slide_idx: slide master index
    :param slide_layout_idx: slide layout index
    :param font_size: size of the font
    :param dst_dir: directory where the generated pptx should get dumped
    :param font_name: name of the font
    :param slide_txt_alignment: alignment of text in slides
    :return path to the generated pptx
    """

    prs = pptx.Presentation(pptx_template)

    # setting text box size and position
    slide_height = pptx.util.Length(prs.slide_height)
    slide_width = pptx.util.Length(prs.slide_width)

    # Emu is English metric unit
    tb_pos = {
        "left": pptx.util.Emu(400000),
        "top": pptx.util.Emu(400000),
        "width": pptx.util.Emu(slide_width - (400000 * 2)),
        "height": pptx.util.Emu(slide_height - (400000 * 2))
    }

    slide_layout = prs.slide_masters[master_slide_idx].slide_layouts[slide_layout_idx]

    with filename.open() as f:

        yml_data = yaml.load(f)

        lyrics = yml_data.get('lyrics')

        hard_font_size = yml_data.get("font_size")
        if hard_font_size:
            msg = f"NOTE: Setting the font size to {hard_font_size} for {filename}"
            click.echo(click.style(msg, fg="blue"))
            font_size = hard_font_size

        for content in lyrics:
            slide = prs.slides.add_slide(slide_layout)

            txbox = slide.shapes.add_textbox(**tb_pos)

            tf = txbox.text_frame

            # this is to keep text frame in the middle of the screen from top to bottom of the screen
            tf.vertical_anchor = pptx.enum.text.MSO_ANCHOR.MIDDLE

            # this is supposed to work as per the documentation but it's not working
            # 09/12/2018
            # tf.fit_text(font_family=font_name, max_size=font_size)

            p = tf.add_paragraph()

            if slide_txt_alignment == "left":
                p.alignment = pptx.enum.text.PP_ALIGN.LEFT
            elif slide_txt_alignment == "middle":
                p.alignment = pptx.enum.text.PP_ALIGN.CENTER
            else:
                p.alignment = pptx.enum.text.PP_ALIGN.RIGHT

            p.font.name = font_name
            p.font.size = pptx.util.Pt(font_size)

            p.text = content.get("english")

    dst_dir.mkdir(parents=True, exist_ok=True)
    dst_file = filename.with_suffix(".pptx")
    dst_path = Path(dst_dir, dst_file.name)

    if dst_path.exists():
        dst_path.unlink()

    prs.save(str(dst_path))

    return dst_path