View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
13338Bug reportsStatisticspublic2018-02-27 14:23
Reporterdapster105 Assigned Toollehar  
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version3.1.x 
Fixed in Version3.4.x 
Summary13338: DejaVuSans.ttf missing from install
Description

This font is required in /assets/fonts for the stats to PDF functionality to work.

Steps To Reproduce

Export stats to PDF

TagsNo tags attached.
Attached Files
lime_dejavusans_error.png (58,622 bytes)   
lime_dejavusans_error.png (58,622 bytes)   
limesurvey_stack_trace.txt (2,253 bytes)   
PHP warning

imageftbbox(): Could not find/open font

/var/www/html/application/third_party/pchart/pChart.class.php(2653)

2641        /* Process labels position & size */
2642        $Caption = "";
2643        if ( !($DrawLabels == PIE_NOLABEL) )
2644         {
2645          $TAngle   = $Angle+($Value*$SpliceRatio/2);
2646          if ($DrawLabels == PIE_PERCENTAGE)
2647           $Caption  = (round($rValues[$Key] * pow(10,$Decimals) * $rSplicePercent)/pow(10,$Decimals))."%";
2648          elseif ($DrawLabels == PIE_LABELS)
2649           $Caption  = $iLabels[$Key];
2650          elseif ($DrawLabels == PIE_PERCENTAGE_LABEL)
2651           $Caption  = $iLabels[$Key]."\r\n".(round($Value * pow(10,$Decimals) * $SplicePercent)/pow(10,$Decimals))."%";
2652
2653          $Position   = imageftbbox($this->FontSize,0,$this->FontName,$Caption);
2654          $TextWidth  = $Position[2]-$Position[0];
2655          $TextHeight = abs($Position[1])+abs($Position[3]);
2656
2657          $TX = cos(($TAngle) * 3.1418 / 180 ) * ($Radius + 10)+ $XPos;
2658
2659          if ( $TAngle > 0 && $TAngle < 180 )
2660           $TY = sin(($TAngle) * 3.1418 / 180 ) * ($SkewHeight + 10) + $YPos + $SpliceHeight + 4;
2661          else
2662           $TY = sin(($TAngle) * 3.1418 / 180 ) * ($SkewHeight + 4) + $YPos - ($TextHeight/2);
2663
2664          if ( $TAngle > 90 && $TAngle < 270 )
2665           $TX = $TX - $TextWidth;

Stack Trace
#0
–
 /var/www/html/application/third_party/pchart/pChart.class.php(2653): imageftbbox(10, 0, "/var/www/html/fonts/DejaVuSans.ttf", "33%")

2648          elseif ($DrawLabels == PIE_LABELS)
2649           $Caption  = $iLabels[$Key];
2650          elseif ($DrawLabels == PIE_PERCENTAGE_LABEL)
2651           $Caption  = $iLabels[$Key]."\r\n".(round($Value * pow(10,$Decimals) * $SplicePercent)/pow(10,$Decimals))."%";
2652
2653          $Position   = imageftbbox($this->FontSize,0,$this->FontName,$Caption);
2654          $TextWidth  = $Position[2]-$Position[0];
2655          $TextHeight = abs($Position[1])+abs($Position[3]);
2656
2657          $TX = cos(($TAngle) * 3.1418 / 180 ) * ($Radius + 10)+ $XPos;
2658

 /var/www/html/index.php(194): CApplication->run()
2018-02-21 14:27:42 nginx/1.10.3 Yii Framework/1.1.18
limesurvey_stack_trace.txt (2,253 bytes)   
Bug heat6
Complete LimeSurvey version number (& build)3.1.0+180124
I will donate to the project if issue is resolvedNo
Browser
Database type & versionSql Server
Server OS (if known)Win
Webserver software & version (if known)IIS
PHP Versionlatest

Users monitoring this issue

There are no users monitoring this issue.

Activities

ollehar

ollehar

2018-02-13 17:00

administrator   ~46414

Is this still an issue in 3.3.0?

damienp

damienp

2018-02-21 13:59

reporter   ~46667

It seems to be an issue in 3.4.0+180219 as well, except that the font need to be in /fonts, which does not even exist.

c_schmitz

c_schmitz

2018-02-21 14:17

administrator   ~46673

I cannot reproduce this. How do reproduce this?

damienp

damienp

2018-02-21 14:22

reporter   ~46676

I first installed 3.3.0, then upgraded to version 3.4.0 by following the instructions here: https://manual.limesurvey.org/Upgrading_from_a_previous_version : basically replacing the previous install by current.
I should add that contrary to dapster105, I use LimeSurvey on Linux, using the stable tar.gz archive.

c_schmitz

c_schmitz

2018-02-21 14:25

administrator   ~46679

But how do you know that files is missing. Do you get an error somewhere? So, how do I reproduce whatever issue you have.

damienp

damienp

2018-02-21 14:31

reporter   ~46682

Sorry, the steps I follow are the following:
In the statistics view, I choose the settings in the attached image.
A php error appears. I attached the beginning of it. It seems the problem resides in pchart ?

ollehar

ollehar

2018-02-23 14:57

administrator   ~46738

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=26581

c_schmitz

c_schmitz

2018-02-27 14:23

administrator   ~46796

Version 3.4.3 Build 180227 released.

Related Changesets

LimeSurvey: master 37ac015c

2018-02-23 14:57:03

ollehar

Details Diff
Fixed issue 13338: DejaVu font missing Affected Issues
13338
add - assets/fonts/DejaVu Fonts License.txt Diff File
add - assets/fonts/DejaVuSans-Bold.ttf Diff File
add - assets/fonts/DejaVuSans-BoldOblique.ttf Diff File
add - assets/fonts/DejaVuSans-ExtraLight.ttf Diff File
add - assets/fonts/DejaVuSans-Oblique.ttf Diff File
add - assets/fonts/DejaVuSans.ttf Diff File
add - assets/fonts/DejaVuSansCondensed-Bold.ttf Diff File
add - assets/fonts/DejaVuSansCondensed-BoldOblique.ttf Diff File
add - assets/fonts/DejaVuSansCondensed-Oblique.ttf Diff File
add - assets/fonts/DejaVuSansCondensed.ttf Diff File

Issue History

Date Modified Username Field Change
2018-02-12 23:47 dapster105 New Issue
2018-02-13 17:00 ollehar Assigned To => ollehar
2018-02-13 17:00 ollehar Status new => feedback
2018-02-13 17:00 ollehar Note Added: 46414
2018-02-21 13:59 damienp Note Added: 46667
2018-02-21 14:17 c_schmitz Note Added: 46673
2018-02-21 14:22 damienp Note Added: 46676
2018-02-21 14:25 c_schmitz Note Added: 46679
2018-02-21 14:31 damienp File Added: lime_dejavusans_error.png
2018-02-21 14:31 damienp File Added: limesurvey_stack_trace.txt
2018-02-21 14:31 damienp Note Added: 46682
2018-02-23 14:53 ollehar Status feedback => confirmed
2018-02-23 14:57 ollehar Changeset attached => LimeSurvey master 37ac015c
2018-02-23 14:57 ollehar Note Added: 46738
2018-02-23 14:57 ollehar Resolution open => fixed
2018-02-23 15:25 ollehar Status confirmed => resolved
2018-02-23 15:25 ollehar Fixed in Version => 3.4.x
2018-02-27 14:23 c_schmitz Note Added: 46796
2018-02-27 14:23 c_schmitz Status resolved => closed