First Commit

This commit is contained in:
marco
2026-09-01 10:46:29 -03:00
commit bf96b77e9c
10000 changed files with 3508600 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
namespace Endroid\QrCode\Label\Font;
final class Font implements FontInterface
{
public function __construct(
private readonly string $path,
private readonly int $size = 16
) {
$this->assertValidPath($path);
}
private function assertValidPath(string $path): void
{
if (!file_exists($path)) {
throw new \Exception(sprintf('Invalid font path "%s"', $path));
}
}
public function getPath(): string
{
return $this->path;
}
public function getSize(): int
{
return $this->size;
}
}
+12
View File
@@ -0,0 +1,12 @@
<?php
declare(strict_types=1);
namespace Endroid\QrCode\Label\Font;
interface FontInterface
{
public function getPath(): string;
public function getSize(): int;
}
+23
View File
@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
namespace Endroid\QrCode\Label\Font;
final class NotoSans implements FontInterface
{
public function __construct(
private int $size = 16
) {
}
public function getPath(): string
{
return __DIR__.'/../../../assets/noto_sans.otf';
}
public function getSize(): int
{
return $this->size;
}
}
+23
View File
@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
namespace Endroid\QrCode\Label\Font;
final class OpenSans implements FontInterface
{
public function __construct(
private int $size = 16
) {
}
public function getPath(): string
{
return __DIR__.'/../../../assets/open_sans.ttf';
}
public function getSize(): int
{
return $this->size;
}
}