def to_ufo_glyph_background(self, glyph, layer):
if not layer.hasBackground:<EOL><INDENT>return<EOL><DEDENT>background = layer.background<EOL>ufo_layer = self.to_ufo_background_layer(glyph)<EOL>new_glyph = ufo_layer.newGlyph(glyph.name)<EOL>width = background.userData[BACKGROUND_WIDTH_KEY]<EOL>if width is not None:<EOL><INDENT>new_glyph.width = width<EOL><DEDENT>self.to_ufo_background_image(new_glyph, background)<EOL>self.to_ufo_paths(new_glyph, background)<EOL>self.to_ufo_components(new_glyph, background)<EOL>self.to_ufo_glyph_anchors(new_glyph, background.anchors)<EOL>self.to_ufo_guidelines(new_glyph, background)<EOL>
Set glyph background.