Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
Remove unused font loading code
Browse files Browse the repository at this point in the history
Code is only used by the load_font.php script in the utils project
and has been relocated to that script.
  • Loading branch information
bsweeney committed Jul 22, 2016
1 parent 36d1153 commit 7498684
Showing 1 changed file with 0 additions and 53 deletions.
53 changes: 0 additions & 53 deletions src/FontMetrics.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,35 +150,6 @@ public function loadFontFamilies()
$this->fontLookup += $distFonts;
}

/**
* @param array $files
* @return array
* @deprecated
*/
public function install_fonts($files)
{
return $this->installFonts($files);
}

/**
* @param array $files
* @return array
*/
public function installFonts(array $files)
{
$names = array();

foreach ($files as $file) {
$font = Font::load($file);
$records = $font->getData("name", "records");
$type = $this->getType($records[2]);
$names[mb_strtolower($records[1])][$type] = $file;
$font->close();
}

return $names;
}

/**
* @param array $style
* @param string $remote_file
Expand Down Expand Up @@ -477,30 +448,6 @@ public function getType($type)
return $type;
}

/**
* @return array
* @deprecated
*/
public function get_system_fonts()
{
return $this->getSystemFonts();
}

/**
* @return array
*/
public function getSystemFonts()
{
$files = glob("/usr/share/fonts/truetype/*.ttf") +
glob("/usr/share/fonts/truetype/*/*.ttf") +
glob("/usr/share/fonts/truetype/*/*/*.ttf") +
glob("C:\\Windows\\fonts\\*.ttf") +
glob("C:\\WinNT\\fonts\\*.ttf") +
glob("/mnt/c_drive/WINDOWS/Fonts/");

return $this->installFonts($files);
}

/**
* @return array
* @deprecated
Expand Down

0 comments on commit 7498684

Please sign in to comment.