def _valid_designspace(self, designspace):
<EOL>copy = designspace<EOL>for source in (s for s in copy.sources if not s.layerName):<EOL><INDENT>if not hasattr(source, "<STR_LIT>") or source.font is None:<EOL><INDENT>if source.path:<EOL><INDENT>source.font = defcon.Font(source.path)<EOL><DEDENT>else:<EOL><INDENT>dirname = os.path.dirname(designspace.path)<EOL>ufo_path = os.path.join(dirname, source.filename)<EOL>source.font = defcon.Font(ufo_path)<EOL><DEDENT><DEDENT>if source.location is None:<EOL><INDENT>source.location = {}<EOL><DEDENT>for name in ("<STR_LIT>", "<STR_LIT>"):<EOL><INDENT>if getattr(source, name) != getattr(source.font.info, name):<EOL><INDENT>self.logger.warning(<EOL>dedent(<EOL>"""<STR_LIT>"""<EOL>).format(<EOL>name=name,<EOL>filename=source.filename,<EOL>source_name=getattr(source, name),<EOL>ufo_name=getattr(source.font.info, name),<EOL>)<EOL>)<EOL>setattr(source, name, getattr(source.font.info, name))<EOL><DEDENT><DEDENT><DEDENT>return copy<EOL>
Make sure that the user-provided designspace has loaded fonts and
        that names are the same as those from the UFOs.