Skip to content

Commit

Permalink
default font to Lato
Browse files Browse the repository at this point in the history
  • Loading branch information
LilyEssence committed Sep 1, 2023
1 parent 2a99f12 commit 3ddd1e8
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/PhpPresentation/Shape/Chart/Series.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public function __construct(string $title = 'Series Title', array $values = [])
{
$this->fill = new Fill();
$this->font = new Font();
$this->font->setName('Calibri');
$this->font->setName();
$this->font->setSize(9);
$this->marker = new Marker();

Expand Down
2 changes: 1 addition & 1 deletion src/PhpPresentation/Shape/Chart/Title.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function __construct()
{
$this->alignment = new Alignment();
$this->font = new Font();
$this->font->setName('Calibri');
$this->font->setName();
$this->font->setSize(18);
}

Expand Down
6 changes: 3 additions & 3 deletions src/PhpPresentation/Style/Bullet.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class Bullet implements ComparableInterface
public function __construct()
{
$this->bulletType = self::TYPE_NONE;
$this->bulletFont = 'Calibri';
$this->bulletFont = 'Lato';
$this->bulletChar = '-';
$this->bulletColor = new Color();
$this->bulletNumericStyle = self::NUMERIC_DEFAULT;
Expand Down Expand Up @@ -176,10 +176,10 @@ public function getBulletFont()
*
* @return \PhpOffice\PhpPresentation\Style\Bullet
*/
public function setBulletFont($pValue = 'Calibri')
public function setBulletFont($pValue = 'Lato')
{
if ('' == $pValue) {
$pValue = 'Calibri';
$pValue = 'Lato';
}
$this->bulletFont = $pValue;

Expand Down
6 changes: 3 additions & 3 deletions src/PhpPresentation/Style/Font.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Font implements ComparableInterface
*
* @var string
*/
private $name = 'Calibri';
private $name = 'Lato';

/**
* Font Size.
Expand Down Expand Up @@ -157,10 +157,10 @@ public function getName(): string
*
* @return self
*/
public function setName(string $pValue = 'Calibri'): self
public function setName(string $pValue = 'Lato'): self
{
if ('' == $pValue) {
$pValue = 'Calibri';
$pValue = 'Lato';
}
$this->name = $pValue;

Expand Down
4 changes: 2 additions & 2 deletions src/PhpPresentation/Writer/PowerPoint2007/PptTheme.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ protected function writeTheme(Slide\SlideMaster $oMasterSlide): string

// a:theme/a:themeElements/a:fontScheme/a:majorFont/a:latin
$objWriter->startElement('a:latin');
$objWriter->writeAttribute('typeface', 'Calibri');
$objWriter->writeAttribute('typeface', 'Lato');
$objWriter->endElement();

// a:theme/a:themeElements/a:fontScheme/a:majorFont/a:ea
Expand Down Expand Up @@ -159,7 +159,7 @@ protected function writeTheme(Slide\SlideMaster $oMasterSlide): string

// a:theme/a:themeElements/a:fontScheme/a:majorFont/a:latin
$objWriter->startElement('a:latin');
$objWriter->writeAttribute('typeface', 'Calibri');
$objWriter->writeAttribute('typeface', 'Lato');
$objWriter->endElement();

// a:theme/a:themeElements/a:fontScheme/a:majorFont/a:ea
Expand Down
2 changes: 1 addition & 1 deletion tests/PhpPresentation/Tests/Shape/Chart/SeriesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function testConstruct(): void

$this->assertInstanceOf(Fill::class, $object->getFill());
$this->assertInstanceOf(Font::class, $object->getFont());
$this->assertEquals('Calibri', $object->getFont()->getName());
$this->assertEquals('Lato', $object->getFont()->getName());
$this->assertEquals(9, $object->getFont()->getSize());
$this->assertEquals('Series Title', $object->getTitle());
$this->assertIsArray($object->getValues());
Expand Down
2 changes: 1 addition & 1 deletion tests/PhpPresentation/Tests/Shape/Chart/TitleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function testConstruct(): void

$this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Alignment', $object->getAlignment());
$this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Font', $object->getFont());
$this->assertEquals('Calibri', $object->getFont()->getName());
$this->assertEquals('Lato', $object->getFont()->getName());
$this->assertEquals(18, $object->getFont()->getSize());
}

Expand Down
6 changes: 3 additions & 3 deletions tests/PhpPresentation/Tests/Style/BulletTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function testConstruct(): void
{
$object = new Bullet();
$this->assertEquals(Bullet::TYPE_NONE, $object->getBulletType());
$this->assertEquals('Calibri', $object->getBulletFont());
$this->assertEquals('Lato', $object->getBulletFont());
$this->assertEquals('-', $object->getBulletChar());
$this->assertEquals(Bullet::NUMERIC_DEFAULT, $object->getBulletNumericStyle());
$this->assertEquals(1, $object->getBulletNumericStartAt());
Expand Down Expand Up @@ -81,9 +81,9 @@ public function testSetGetBulletFont(): void
{
$object = new Bullet();
$this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Bullet', $object->setBulletFont());
$this->assertEquals('Calibri', $object->getBulletFont());
$this->assertEquals('Lato', $object->getBulletFont());
$this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Bullet', $object->setBulletFont(''));
$this->assertEquals('Calibri', $object->getBulletFont());
$this->assertEquals('Lato', $object->getBulletFont());
$this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Bullet', $object->setBulletFont('Arial'));
$this->assertEquals('Arial', $object->getBulletFont());
}
Expand Down
6 changes: 3 additions & 3 deletions tests/PhpPresentation/Tests/Style/FontTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class FontTest extends TestCase
public function testConstruct(): void
{
$object = new Font();
$this->assertEquals('Calibri', $object->getName());
$this->assertEquals('Lato', $object->getName());
$this->assertEquals(10, $object->getSize());
$this->assertFalse($object->isBold());
$this->assertFalse($object->isItalic());
Expand Down Expand Up @@ -101,9 +101,9 @@ public function testName(): void
{
$object = new Font();
$this->assertInstanceOf(Font::class, $object->setName());
$this->assertEquals('Calibri', $object->getName());
$this->assertEquals('Lato', $object->getName());
$this->assertInstanceOf(Font::class, $object->setName(''));
$this->assertEquals('Calibri', $object->getName());
$this->assertEquals('Lato', $object->getName());
$this->assertInstanceOf(Font::class, $object->setName('Arial'));
$this->assertEquals('Arial', $object->getName());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function testAxisFont(): void
$this->assertZipXmlAttributeEquals('Object 1/content.xml', $element, 'fo:color', '#AABBCC');
$this->assertZipXmlAttributeEquals('Object 1/content.xml', $element, 'fo:font-style', 'italic');
$this->assertZipXmlAttributeEquals('Object 1/content.xml', $element, 'fo:font-size', '10pt');
$this->assertZipXmlAttributeEquals('Object 1/content.xml', $element, 'fo:font-family', 'Calibri');
$this->assertZipXmlAttributeEquals('Object 1/content.xml', $element, 'fo:font-family', 'Lato');

$element = '/office:document-content/office:automatic-styles/style:style[@style:name=\'styleAxisY\']/style:text-properties';
$this->assertZipXmlElementExists('Object 1/content.xml', $element);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ public function testRichTextRunFontFormat(): void

$this->assertZipXmlElementExists('ppt/slides/slide1.xml', $latinElement);
$this->assertZipXmlAttributeExists('ppt/slides/slide1.xml', $latinElement, 'typeface');
$this->assertZipXmlAttributeEquals('ppt/slides/slide1.xml', $latinElement, 'typeface', 'Calibri');
$this->assertZipXmlAttributeEquals('ppt/slides/slide1.xml', $latinElement, 'typeface', 'Lato');
$this->assertZipXmlElementNotExists('ppt/slides/slide1.xml', $eastAsianElement);
$this->assertZipXmlElementNotExists('ppt/slides/slide1.xml', $complexScriptElement);
$this->assertIsSchemaECMA376Valid();
Expand All @@ -789,7 +789,7 @@ public function testRichTextRunFontFormat(): void
$this->assertZipXmlElementNotExists('ppt/slides/slide1.xml', $latinElement);
$this->assertZipXmlElementExists('ppt/slides/slide1.xml', $eastAsianElement);
$this->assertZipXmlAttributeExists('ppt/slides/slide1.xml', $eastAsianElement, 'typeface');
$this->assertZipXmlAttributeEquals('ppt/slides/slide1.xml', $eastAsianElement, 'typeface', 'Calibri');
$this->assertZipXmlAttributeEquals('ppt/slides/slide1.xml', $eastAsianElement, 'typeface', 'Lato');
$this->assertZipXmlElementNotExists('ppt/slides/slide1.xml', $complexScriptElement);
$this->assertIsSchemaECMA376Valid();

Expand All @@ -800,7 +800,7 @@ public function testRichTextRunFontFormat(): void
$this->assertZipXmlElementNotExists('ppt/slides/slide1.xml', $eastAsianElement);
$this->assertZipXmlElementExists('ppt/slides/slide1.xml', $complexScriptElement);
$this->assertZipXmlAttributeExists('ppt/slides/slide1.xml', $complexScriptElement, 'typeface');
$this->assertZipXmlAttributeEquals('ppt/slides/slide1.xml', $complexScriptElement, 'typeface', 'Calibri');
$this->assertZipXmlAttributeEquals('ppt/slides/slide1.xml', $complexScriptElement, 'typeface', 'Lato');
$this->assertIsSchemaECMA376Valid();
}

Expand Down

0 comments on commit 3ddd1e8

Please sign in to comment.