mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-09 16:32:39 +01:00
Impact Font Used If Available
Summary: Fixed T2395 Test Plan: When impact.ttf was added to resources/font, it was being used. When renamed, tuffy was. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T2395 Differential Revision: https://secure.phabricator.com/D4700
This commit is contained in:
parent
1c64b40a22
commit
f4971b0858
2 changed files with 8 additions and 1 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -24,3 +24,6 @@
|
|||
/conf/local/local.json
|
||||
/conf/local/ENVIRONMENT
|
||||
/conf/local/VERSION
|
||||
|
||||
# Impact Font
|
||||
/resources/font/impact.ttf
|
||||
|
|
|
@ -175,7 +175,11 @@ final class PhabricatorImageTransformer {
|
|||
$data = $file->loadFileData();
|
||||
$img = imagecreatefromstring($data);
|
||||
$phabricator_root = dirname(phutil_get_library_root('phabricator'));
|
||||
$font_path = $phabricator_root.'/resources/font/tuffy.ttf';
|
||||
$font_root = $phabricator_root.'/resources/font/';
|
||||
$font_path = $font_root.'tuffy.ttf';
|
||||
if (Filesystem::pathExists($font_root.'impact.ttf')) {
|
||||
$font_path = $font_root.'impact.ttf';
|
||||
}
|
||||
$white = imagecolorallocate($img, 255, 255, 255);
|
||||
$black = imagecolorallocate($img, 0, 0, 0);
|
||||
$border_width = 3;
|
||||
|
|
Loading…
Reference in a new issue