Skip to content
Snippets Groups Projects
Commit 04eef93b authored by Morris Jobke's avatar Morris Jobke
Browse files

Merge pull request #13648 from oparoz/sfnt-fonts-preview

Add support for font previews
parents cf25e6f5 f49805ee
No related branches found
No related tags found
No related merge requests found
......@@ -681,6 +681,7 @@ $CONFIG = array(
* - OC\Preview\StarOffice
* - OC\Preview\SVG
* - OC\Preview\TIFF
* - OC\Preview\Font
*
* .. note:: Troubleshooting steps for the MS Word previews are available
* at the :doc:`../configuration_files/collaborative_documents_configuration`
......
......@@ -713,6 +713,7 @@ class Preview {
* - OC\Preview\Illustrator
* - OC\Preview\Postscript
* - OC\Preview\Photoshop
* - OC\Preview\Font
*/
if(empty(self::$enabledProviders)) {
self::$enabledProviders = \OC::$server->getConfig()->getSystemValue('enabledPreviewProviders', array(
......@@ -772,8 +773,8 @@ class Preview {
'PDF' => 'OC\Preview\PDF',
'AI' => 'OC\Preview\Illustrator',
'PSD' => 'OC\Preview\Photoshop',
// Requires adding 'eps' => array('application/postscript', null), to lib/private/mimetypes.list.php
'EPS' => 'OC\Preview\Postscript',
'TTF' => 'OC\Preview\Font',
);
foreach ($imagickProviders as $queryFormat => $provider) {
......
<?php
/**
* @copyright Olivier Paroz 2015 <owncloud@interfasys.ch>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
namespace OC\Preview;
// .otf, .ttf and .pfb
class Font extends Bitmap {
/**
* {@inheritDoc}
*/
public function getMimeType() {
return '/application\/(?:font-sfnt|x-font$)/';
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment