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)); }
/** * Set proper font sizes by font. * * @param Font $font */ public function setFont(Font $font) { $this->characterSizes = $this->sizeCollection->get($font->getName(), $font->getSize()); }