def get_component_contours(component, font_file):
    """
    helper function to gather contours for a glyph that is defined in terms of
    another glyph

    Parameters
    ----------
    component: the XML object for the component tag which corresponds to a
    different glyph

    font_file: XML object of the ttx file for the given font

    Returns
    -------
    all the contours from the component glyph
    """

    glyph_name = component.get("glyph_name")
    glyph = font_file.findall('.//TTGlyph[@name="{}"]'.format(glyph_name))[0]
    return glyph.findall("contour")