Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
f49805ee
Commit
f49805ee
authored
Jan 24, 2015
by
Olivier Paroz
Browse files
Options
Downloads
Patches
Plain Diff
Add support for font previews
parent
09a06e4f
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
config/config.sample.php
+1
-0
1 addition, 0 deletions
config/config.sample.php
lib/private/preview.php
+2
-1
2 additions, 1 deletion
lib/private/preview.php
lib/private/preview/font.php
+19
-0
19 additions, 0 deletions
lib/private/preview/font.php
with
22 additions
and
1 deletion
config/config.sample.php
+
1
−
0
View file @
f49805ee
...
...
@@ -679,6 +679,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:`collaborative_documents_configuration` section
...
...
This diff is collapsed.
Click to expand it.
lib/private/preview.php
+
2
−
1
View file @
f49805ee
...
...
@@ -731,6 +731,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
(
...
...
@@ -790,8 +791,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
)
{
...
...
This diff is collapsed.
Click to expand it.
lib/private/preview/font.php
0 → 100644
+
19
−
0
View file @
f49805ee
<?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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment