def merge(base, custom):
    """
	Create a new font by choosing glyphs from two other fonts.

	:param Font base: The lower-priority font.
	:param Font custom: The higher-priority font.
	:returns: A font where each glyph comes from ``base`` or ``custom``.

	For any given codepoint, the resulting font will use the corresponding
	glyph from ``custom`` if there is one, falling back to the glyph from
	``base``. The new font's properties and other metadata are all copied
	from ``custom``.
	"""
    res = custom.copy()
    for cp in base.codepoints():
        if cp not in res:
            old_glyph = base[cp]
            res.new_glyph_from_data(old_glyph.name, old_glyph.get_data(),
                old_glyph.bbX, old_glyph.bbY, old_glyph.bbW, old_glyph.bbH,
                old_glyph.advance, old_glyph.codepoint)
    return res
