code: def from_layer(cls, font, layerName=None, copy=False, skipExportGlyphs=None):
          
          if layerName is not None:
              layer = font.layers[layerName]
          else:
              layer = font.layers.defaultLayer
  
          if copy:
              self = _copyLayer(layer, obj_type=cls)
              self.lib = deepcopy(layer.lib)
          else:
              self = cls((g.name, g) for g in layer)
              self.lib = layer.lib
  
          # If any glyphs in the skipExportGlyphs list are used as components, decompose
          # them in the containing glyphs...
          if skipExportGlyphs:
              for glyph in self.values():
                  if any(c.baseGlyph in skipExportGlyphs for c in glyph.components):
                      deepCopyContours(self, glyph, glyph, Transform(), skipExportGlyphs)
                      if hasattr(glyph, "removeComponent"):  # defcon
                          for c in [
                              component
                              for component in glyph.components
                              if component.baseGlyph in skipExportGlyphs
                          ]:
                              glyph.removeComponent(c)
                      else:  # ufoLib2
                          glyph.components[:] = [
                              c
                              for c in glyph.components
                              if c.baseGlyph not in skipExportGlyphs
                          ]
              # ... and then remove them from the glyph set, if even present.
              for glyph_name in skipExportGlyphs:
                  if glyph_name in self:
                      del self[glyph_name]
  
          self.name = layer.name if layerName is not None else None
          return self
docs: Return a mapping of glyph names to glyph objects from `font`.