Font.php 539 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace OC\Preview;
  8. // .otf, .ttf and .pfb
  9. class Font extends Bitmap {
  10. /**
  11. * {@inheritDoc}
  12. */
  13. public function getMimeType(): string {
  14. return '/application\/(?:font-sfnt|x-font$)/';
  15. }
  16. /**
  17. * {@inheritDoc}
  18. */
  19. protected function getAllowedMimeTypes(): string {
  20. return '/(application|image)\/(?:font-sfnt|x-font|x-otf|x-ttf|x-pfb$)/';
  21. }
  22. }