name = $name; $this->path = $path; } public function getFontPath() { return $this->path; } public function getFontName() { return $this->name; } private static function resolveFontUrl($path, $embed, $mimeType) { if (!$embed) { return $path; } $data = file_get_contents($path); if ($data === false) { throw new RuntimeException(esc_html('Font file "' . $path . '" could not be read.')); } return sprintf('data:%s;base64,%s', $mimeType, base64_encode($data)); } }