Example #1
0
def build_instances(filename,
                    master_dir,
                    instance_dir,
                    family_name=None,
                    propagate_anchors=True,
                    round_geometry=True):
    """Write and return UFOs from the instances defined in a .glyphs file.

    Args:
        master_dir: Directory where masters are written.
        instance_dir: Directory where instances are written.
        family_name: If provided, the master UFOs will be given this name and
            only instances with this name will be built.
    """

    master_ufos, instance_data = load_to_ufos(
        filename,
        include_instances=True,
        family_name=family_name,
        propagate_anchors=propagate_anchors)
    instance_ufos = interpolate(master_ufos,
                                master_dir,
                                instance_dir,
                                instance_data,
                                round_geometry=round_geometry)
    return instance_ufos
Example #2
0
def build_instances(filename, master_dir, instance_dir):
    """Write and return UFOs from the instances defined in a .glyphs file."""

    master_ufos, instance_data = load_to_ufos(
        filename, include_instances=True)
    instance_ufos = interpolate(
        master_ufos, master_dir, instance_dir, instance_data)
    return instance_ufos
Example #3
0
def build_instances(filename, master_dir, instance_dir, family_name=None):
    """Write and return UFOs from the instances defined in a .glyphs file.

    Args:
        master_dir: Directory where masters are written.
        instance_dir: Directory where instances are written.
        family_name: If provided, the master UFOs will be given this name and
            only instances with this name will be built.
    """

    master_ufos, instance_data = load_to_ufos(
        filename, include_instances=True, family_name=family_name)
    instance_ufos = interpolate(
        master_ufos, master_dir, instance_dir, instance_data)
    return instance_ufos