Ejemplo n.º 1
0
 /**
  * Create text run (can be formatted)
  *
  * @param  string                           $pText Text
  * @return \PhpOffice\PhpPowerpoint\Shape\RichText\Run
  * @throws \Exception
  */
 public function createTextRun($pText = '')
 {
     $objText = new Run($pText);
     $objText->setFont(clone $this->font);
     $this->addText($objText);
     return $objText;
 }
Ejemplo n.º 2
0
 public function testFont()
 {
     $object = new Run();
     $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Shape\\RichText\\Run', $object->setFont(new Font()));
     $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Style\\Font', $object->getFont());
 }