Licitator 1.0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

57 lines
1.8 KiB

<?php
namespace Prometeo\CommandsBundle\ManualTraits;
use PhpOffice\PhpWord\Style\Font;
trait StylesTrait
{
public function createDefaultFonts(&$phpword){
$fonts=[];
$chapter= new Font();
$chapter->setBold(true);
$chapter->setName('Century Gothic');
$chapter->setSize(24);
$portada= new Font();
$portada->setBold(true);
$portada->setName('Century Gothic');
$portada->setSize(18);
$second= new Font();
$second->setBold(true);
$second->setName('Century Gothic');
$second->setSize(12);
$paragraph= new Font();
$paragraph->setBold(true);
$paragraph->setName('Verdana');
$paragraph->setSize(10);
$footerportada=new Font();
$footerportada->setBold(true);
$footerportada->setName('Verdana');
$footerportada->setSize(7);
$footerportada->setColor('#808080');
$footer=new Font();
$footer->setBold(true);
$footer->setName('Verdana');
$footer->setSize(6);
$footer->setColor('#9900ff');
$header=new Font();
$header->setBold(true);
$header->setName('Tahoma');
$header->setSize(7);
$header->setColor('#F5F5F5');
$fonts['chapter']=$chapter;
$fonts['second']=$second;
$fonts['paragraph']=$paragraph;
$fonts['footer']=$footer;
$fonts['footerportada']=$footerportada;
$fonts['header']=$header;
$fonts['portada']=$portada;
$this->fonts=$fonts;
$phpword->addFontStyle('font_h1', array('name'=>'Century Gothic', 'size'=>24, 'color'=>'990000'));
$phpword->addFontStyle('font_h2', array('name'=>'Century Gothic', 'size'=>12, 'color'=>'990000'));
$phpword->addTitleStyle(1, "font_h1"); //h1
$phpword->addTitleStyle(2, "font_h2"); //h2
}
}