fedora7では存在していた、TureTypeのパスが無くなってしまったことから、phpmyvisitesのグラフの文字化けが再発。

いや、フォントがないんだから、画像さえ表示されない状態になってしまった。

/usr/share/fonts/japanese/TrueType/

が無くなってしまったので、

/usr/share/fonts/sazanami-fonts-gothic/

に無理やりlinkさせている。

#ln -s /usr/share/fonts/japanese/TrueType /etc/X11/fontpath.d/sazanami-fonts-gothic
#mkdir /usr/share/fonts/japanese/TrueType
#cd /usr/share/fonts/japanese/TrueType
#mkfontscale
#mkfontdir

仕方ないので、sazanami-fonts-gothicのsazanami-gothic.ttfを使用して、phpmyvisitesのグラフの文字化けを直しています。

非常に役に立ったHPはphpmyvisitesのグラフの文字化けを直すです。感謝。m(_ _)m

自分の場合は、こういう風にPHPを手直してみた。

/var/www/html/phpmv2/core/include/graphs/PmvGraph.class.phpを・・・

[dec]
    function PmvGraph( $width, $height )
      {    
          $this->width = $width;
          $this->height = $height;
          $this->graph = new Graph($width, $height);
          //$this->fontPath = FONTS_PATH.Lang::getFontName();
          $this->fontPath = “/usr/share/fonts/sazanami-fonts-gothic/”;
          $GLOBALS[’defaultFont’] = ’sazanami-gothic.ttf’;
          if(!is_file($this->fontPath))
          {
              //$this->fontPath = FONTS_PATH . $GLOBALS[’defaultFont’];
              $this->fontPath = $this->fontPath . $GLOBALS[’defaultFont’];
          }
          $this->font8 = new TTFFont( $this->fontPath, 7);
          $this->font9 = new TTFFont( $this->fontPath, 8);
          $this->font10 = new TTFFont( $this->fontPath, 9);
          $this->font16 = new TTFFont( $this->fontPath, 15);
      }
[/dec]

こんな感じに。○┓ペコ

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

This site uses Akismet to reduce spam. Learn how your comment data is processed.