Write the <font> element.
356696
def write_font(font)
      caption = font[:_caption]
      face    = 'Calibri'
      size    = 220
      color   = '#000000'

      attributes = [
                    ['face',  face],
                    ['size',  size],
                    ['color', color]
                   ]
      @writer.data_element('font', caption, attributes)
    end
1103160
def write(self, text, fg='black', bg='white'):
        ''''''
        if isinstance(text, str):
            sys.stdout.write(text)
        else:
            sys.stdout.write(str(text))
        sys.stdout.flush()
892265
def set_font(self, font):
        """"""
        self.setFont(font)
        self.set_pythonshell_font(font)
        cursor = self.textCursor()
        cursor.select(QTextCursor.Document)
        charformat = QTextCharFormat()
        charformat.setFontFamily(font.family())
        charformat.setFontPointSize(font.pointSize())
        cursor.mergeCharFormat(charformat)
474301
def write(self, more):
        """"""
        if more:
            self.output += str(more).upper()
            self.output += '\n'
37473
private function _writeFont(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_Font $pFont = null)
	{
		// font
		$objWriter->startElement('font');
			//	Weird! The order of these elements actually makes a difference when opening Excel2007
			//		files in Excel2003 with the compatibility pack. It's not documented behaviour,
			//		and makes for a real WTF!

			// Bold. We explicitly write this element also when false (like MS Office Excel 2007 does
			// for conditional formatting). Otherwise it will apparently not be picked up in conditional
			// formatting style dialog
			if ($pFont->getBold() !== NULL) {
				$objWriter->startElement('b');
					$objWriter->writeAttribute('val', $pFont->getBold() ? '1' : '0');
				$objWriter->endElement();
			}

			// Italic
			if ($pFont->getItalic() !== NULL) {
				$objWriter->startElement('i');
					$objWriter->writeAttribute('val', $pFont->getItalic() ? '1' : '0');
				$objWriter->endElement();
			}

			// Strikethrough
			if ($pFont->getStrikethrough() !== NULL) {
				$objWriter->startElement('strike');
				$objWriter->writeAttribute('val', $pFont->getStrikethrough() ? '1' : '0');
				$objWriter->endElement();
			}

			// Underline
			if ($pFont->getUnderline() !== NULL) {
				$objWriter->startElement('u');
				$objWriter->writeAttribute('val', $pFont->getUnderline());
				$objWriter->endElement();
			}

			// Superscript / subscript
			if ($pFont->getSuperScript() === TRUE || $pFont->getSubScript() === TRUE) {
				$objWriter->startElement('vertAlign');
				if ($pFont->getSuperScript() === TRUE) {
					$objWriter->writeAttribute('val', 'superscript');
				} else if ($pFont->getSubScript() === TRUE) {
					$objWriter->writeAttribute('val', 'subscript');
				}
				$objWriter->endElement();
			}

			// Size
			if ($pFont->getSize() !== NULL) {
				$objWriter->startElement('sz');
					$objWriter->writeAttribute('val', $pFont->getSize());
				$objWriter->endElement();
			}

			// Foreground color
			if ($pFont->getColor()->getARGB() !== NULL) {
				$objWriter->startElement('color');
				$objWriter->writeAttribute('rgb', $pFont->getColor()->getARGB());
				$objWriter->endElement();
			}

			// Name
			if ($pFont->getName() !== NULL) {
				$objWriter->startElement('name');
					$objWriter->writeAttribute('val', $pFont->getName());
				$objWriter->endElement();
			}

		$objWriter->endElement();
	}
578868
def _write(self, text):
        """"""
        spaces = ' ' * (self.indent * self.indentlevel)
        t = spaces + text.strip() + '\n'
        if hasattr(t, 'encode'):
            t = t.encode(self.encoding, 'xmlcharrefreplace')
        self.stream.write(t)
795806
public void setFontStyle() {

        if (!CmsStringUtil.isEmptyOrWhitespaceOnly(m_styleName)) {
            removeStyleName(m_styleName);
        }
        String id = new CmsUUID().getStringValue();
        m_styleName = CSS_CLASSNAME + "_" + id;
        addStyleName(m_styleName);
        String js = "var elements = document.getElementsByClassName('"
            + m_styleName
            + "');"
            + "var iframeContainer = elements[0];"
            + "var iframe = iframeContainer.getElementsByTagName('iframe')[0];"
            + "var iframeBody = iframe.contentDocument.getElementsByTagName('body')[0];"
            + "iframeBody.style.fontFamily='\"Open Sans\", sans-serif';";

        JavaScript.getCurrent().execute(js);

    }
509085
function rewriteFonts () {
  const style = path.join(target, 'css', 'style.css')
  const css = fs.readFileSync(style)
    .toString()
    .replace(/@import url\(.*?Roboto.*?\);/, `@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,600|Source+Code+Pro:400,600');`)
    .replace(/Roboto/g, 'Open Sans')

  fs.writeFileSync(style, `
    ${css}

    code {
      font-family: 'Source Code Pro', monospace;
    }

    pre > code {
      padding: 0.75em 1em;
      line-height: 1.5em;
    }

    ul, ol {
      margin-bottom: 15px;
    }

    hr {
      border: 0;
      height: 2px;
      background: #f5f5f5;
      margin: 15px 0;
    }

    blockquote {
      border-left: 3px solid #eee;
      padding-left: 0.75em;
      margin-bottom: 15px;
      color: #999;
      font-size: 0.9em;
    }
  `)
}
273823
def update_font(self):
        """"""
        color_scheme = self.get_color_scheme()
        font = self.get_plugin_font()
        for editor in self.editors:
            editor.set_font(font, color_scheme)
600582
function (out) {
            this._frame.writeMarkupEnd(out);
            var oSelf = this;
            ariaUtilsArray.forEach(this._iconsRight, function (value) {
                oSelf._writeIcon(value, out);
            });
        }
175996
function (out) {
            out.write("<div class=\"" + this.CSS_CLASS + "\">");

            if (this._cfg.contentMacro) {
                out.callMacro(this._cfg.contentMacro);
            }

            out.write("</div>");
        }
348732
function (out) {
            var textContent = this._cfg.text;
            // String cast
            if (textContent !== null) {
                textContent = '' + textContent;
            } else {
                textContent = '';
            }
            this.textContent = textContent;
            out.write('<span class="createdEllipisElement">' + ariaUtilsString.escapeHTML(this.textContent)
                    + "</span>");
        }
109676
private void writeElements(String currentIndent, String tagName, StringBuilder attrs, SerIterator itemIterator) throws IOException {
        if (itemIterator.metaTypeRequired()) {
            appendAttribute(attrs, METATYPE, itemIterator.metaTypeName());
        }
        if (itemIterator.category() == SerCategory.GRID) {
            appendAttribute(attrs, ROWS, Integer.toString(itemIterator.dimensionSize(0)));
            appendAttribute(attrs, COLS, Integer.toString(itemIterator.dimensionSize(1)));
        }
        if (itemIterator.size() == 0) {
            output.append(currentIndent).append('<').append(tagName).append(attrs).append('/').append('>').append(settings.getNewLine());
        } else {
            output.append(currentIndent).append('<').append(tagName).append(attrs).append('>').append(settings.getNewLine());
            writeElements(currentIndent + settings.getIndent(), itemIterator);
            output.append(currentIndent).append('<').append('/').append(tagName).append('>').append(settings.getNewLine());
        }
    }
12556
def write(self):
        ''''''
        with open(self.me, 'w') as f:
            f.write(self.printMe(self.tag, self.value))
59338
function (out) {
            var skinObj = this._skinObj, cfg = this._cfg;
            out.write(['<span style="float:left;text-align:', cfg.labelAlign,
                    skinObj.labelMargins ? ';margin:' + skinObj.labelMargins : '',
                    skinObj.labelFontSize ? ';font-size:' + skinObj.labelFontSize + 'px' : '',
                    cfg.labelWidth > -1 ? ';width:' + cfg.labelWidth + 'px' : '', '">',
                    ariaUtilsString.escapeHTML(cfg.label), '</span>'].join(""));
        }
1362627
def writeline(self, text):
        """"""
        log.debug('writing line %r' % text)
        self.write(text+chr(10))
738006
def OnCellFontBold(self, event):
        """"""

        with undo.group(_("Bold")):
            try:
                try:
                    weight = getattr(wx, event.weight[2:])

                except AttributeError:
                    msg = _("Weight {weight} unknown").format(
                            weight=event.weight)
                    raise ValueError(msg)

                self.grid.actions.set_attr("fontweight", weight)

            except AttributeError:
                self.grid.actions.toggle_attr("fontweight")

        self.grid.ForceRefresh()

        self.grid.update_attribute_toolbar()

        event.Skip()