docs: def addSource(self,
              path,
              name,
              location,
              copyLib=False,
              copyGroups=False,
              copyInfo=False,
              copyFeatures=False,
              muteKerning=False,
              muteInfo=False,
              mutedGlyphNames=None,
              familyName=None,
              styleName=None,
          ):
          """
          Add a new UFO source to the document.
          *   path:           path to this UFO, will be written as a relative path to the document path.
          *   name:           reference name for this source
          *   location:       name of the location for this UFO
          *   copyLib:        copy the contents of this source to instances
          *   copyGroups:     copy the groups of this source to instances
          *   copyInfo:       copy the non-numerical fields from this source.info to instances.
          *   copyFeatures:   copy the feature text from this source to instances
          *   muteKerning:    mute the kerning data from this source
          *   muteInfo:       mute the font info data from this source
          *   familyName:     family name for this UFO (to be able to work on the names without reading the whole UFO)
          *   styleName:      style name for this UFO (to be able to work on the names without reading the whole UFO)
  
          Note: no separate flag for mute font: the source is just not added.
          """
          sourceElement = ET.Element("source")
          sourceElement.attrib['filename'] = self._posixPathRelativeToDocument(path)
          sourceElement.attrib['name'] = name
          if copyLib:
              libElement = ET.Element('lib')
              libElement.attrib['copy'] = "1"
              sourceElement.append(libElement)
  
          if copyGroups:
              groupsElement = ET.Element('groups')
              groupsElement.attrib['copy'] = "1"
              sourceElement.append(groupsElement)
  
          if copyFeatures:
              featuresElement = ET.Element('features')
              featuresElement.attrib['copy'] = "1"
              sourceElement.append(featuresElement)
  
          if copyInfo or muteInfo:
              # copy info:
              infoElement = ET.Element('info')
              if copyInfo:
                  infoElement.attrib['copy'] = "1"
              if muteInfo:
                  infoElement.attrib['mute'] = "1"
              sourceElement.append(infoElement)
  
          if muteKerning:
              # add kerning element to the source
              kerningElement = ET.Element("kerning")
              kerningElement.attrib["mute"] = '1'
              sourceElement.append(kerningElement)
  
          if mutedGlyphNames:
              # add muted glyphnames to the source
              for name in mutedGlyphNames:
                  glyphElement = ET.Element("glyph")
                  glyphElement.attrib["name"] = name
                  glyphElement.attrib["mute"] = '1'
                  sourceElement.append(glyphElement)
  
          if familyName is not None:
              sourceElement.attrib['familyname'] = familyName
          if styleName is not None:
              sourceElement.attrib['stylename'] = styleName
  
  
          locationElement = self._makeLocationElement(location)
          sourceElement.append(locationElement)
          self.root.findall('.sources')[0].append(sourceElement)