Example #1
0
 public function testGetNonExistantFontAndSize()
 {
     $collection = new SizeCollection();
     $fontWidths = $collection->get('Somefont', 25);
     $defaultFontWidths = $collection->get('Calibri', 13);
     $this->assertLessThanOrEqual(array_sum($defaultFontWidths) * 2, array_sum($fontWidths));
 }
Example #2
0
 /**
  * Set proper font sizes by font.
  *
  * @param Font $font
  */
 public function setFont(Font $font)
 {
     $this->characterSizes = $this->sizeCollection->get($font->getName(), $font->getSize());
 }