/** * Write level font. * * @since 0.11.0 * * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Style\NumberingLevel $level * @return void * @todo Use font style writer */ private function writeFont(XMLWriter $xmlWriter, NumberingLevel $level) { $font = $level->getFont(); $hint = $level->getHint(); $xmlWriter->startElement('w:rPr'); $xmlWriter->startElement('w:rFonts'); $xmlWriter->writeAttributeIf($font !== null, 'w:ascii', $font); $xmlWriter->writeAttributeIf($font !== null, 'w:hAnsi', $font); $xmlWriter->writeAttributeIf($font !== null, 'w:cs', $font); $xmlWriter->writeAttributeIf($hint !== null, 'w:hint', $hint); $xmlWriter->endElement(); // w:rFonts $xmlWriter->endElement(); // w:rPr }
/** * Write polyline. * * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Style\Shape $style * @return void */ private function writePolyline(XMLWriter $xmlWriter, ShapeStyle $style) { $xmlWriter->writeAttributeIf($style->getPoints() !== null, 'points', $style->getPoints()); }