summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-03-26 12:05:02 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2018-03-27 06:07:08 +0200
commit5cca6f0e61d7ebc8d87d73f4dc0f821adcde3c64 (patch)
tree75fb584d320faf1a0aef1360fc0f0ff458d23004 /solenv
parent655b9054bc265de377c3dc411e2ef40cdfd16dce (diff)
Require and import Font::TTF::Font instead of use
... to avoid the dependency in non-windows builds Change-Id: I37a95cf49b01a24833bcc01166d5c2c855ce1b49 Reviewed-on: https://gerrit.libreoffice.org/51870 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'solenv')
-rw-r--r--solenv/bin/modules/installer/windows/file.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/solenv/bin/modules/installer/windows/file.pm b/solenv/bin/modules/installer/windows/file.pm
index 72f32949bd47..acd9792b8213 100644
--- a/solenv/bin/modules/installer/windows/file.pm
+++ b/solenv/bin/modules/installer/windows/file.pm
@@ -30,7 +30,6 @@ use installer::windows::idtglobal;
use installer::windows::msiglobal;
use installer::windows::language;
use installer::windows::component;
-use Font::TTF::Font;
##########################################################################
# Assigning one cabinet file to each file. This is requrired,
@@ -555,6 +554,8 @@ sub get_fileversion
# file version for font files (tdf#76239)
if ( $onefile->{'Name'} =~ /\.(otf|ttf|ttc)$/i )
{
+ require Font::TTF::Font;
+ Font::TTF::Font->import;
my $fnt = Font::TTF::Font->open("<$onefile->{'sourcepath'}");
# 5 is pre-defined name ID for version string - see
# https://docs.microsoft.com/en-us/typography/opentype/spec/name