font.pm (9780544f) font.pm (b274bc22)
1#**************************************************************
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance

--- 54 unchanged lines hidden (view full) ---

63 }
64 }
65
66 # Saving the file
67
68 my $fonttablename = $basedir . $installer::globals::separator . "Font.idt";
69 installer::files::save_file($fonttablename ,\@fonttable);
70 my $infoline = "Created idt file: $fonttablename\n";
1#**************************************************************
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance

--- 54 unchanged lines hidden (view full) ---

63 }
64 }
65
66 # Saving the file
67
68 my $fonttablename = $basedir . $installer::globals::separator . "Font.idt";
69 installer::files::save_file($fonttablename ,\@fonttable);
70 my $infoline = "Created idt file: $fonttablename\n";
71 push(@installer::globals::logfileinfo, $infoline);
71 $installer::logger::Lang->print($infoline);
72
73}
74
75#################################################################################
76# Reading the Font version from the ttf file, to avoid installation
77# of older files over newer files.
78#################################################################################
79

--- 7 unchanged lines hidden (view full) ---

87 my $infoline = "";
88
89 my $onefile = installer::files::read_binary_file($fontfile);
90
91 if ( $onefile =~ /Version\s+(\d+\.\d+\.*\d*)/ )
92 {
93 $fontversion = $1;
94 $infoline = "FONT: Font \"$fontfile\" version: $fontversion\n";
72
73}
74
75#################################################################################
76# Reading the Font version from the ttf file, to avoid installation
77# of older files over newer files.
78#################################################################################
79

--- 7 unchanged lines hidden (view full) ---

87 my $infoline = "";
88
89 my $onefile = installer::files::read_binary_file($fontfile);
90
91 if ( $onefile =~ /Version\s+(\d+\.\d+\.*\d*)/ )
92 {
93 $fontversion = $1;
94 $infoline = "FONT: Font \"$fontfile\" version: $fontversion\n";
95 push(@installer::globals::logfileinfo, $infoline);
95 $installer::logger::Lang->print($infoline);
96 }
97 else
98 {
99 $infoline = "FONT: Could not determine font version: \"$fontfile\"\n";
96 }
97 else
98 {
99 $infoline = "FONT: Could not determine font version: \"$fontfile\"\n";
100 push(@installer::globals::logfileinfo, $infoline);
100 $installer::logger::Lang->print($infoline);
101 }
102
103 return $fontversion;
104}
105
1061;
101 }
102
103 return $fontversion;
104}
105
1061;