Skip to content

Commit

Permalink
Fixed issue: Some fonts for Asian languages not properly loaded for P…
Browse files Browse the repository at this point in the history
…DF output
  • Loading branch information
c-schmitz committed Dec 14, 2018
1 parent cd01fa9 commit 01c7555
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 126 deletions.
2 changes: 1 addition & 1 deletion application/helpers/userstatistics_helper.php
Expand Up @@ -51,7 +51,7 @@ function createChart($iQuestionID, $iSurveyID, $type = null, $lbl, $gdata, $graw
$chartfontfile = 'DejaVuSans.ttf';
if (array_key_exists($sLanguageCode, $alternatechartfontfile)) {
$neededfontfile = $alternatechartfontfile[$sLanguageCode];
if (is_file($rootdir."/fonts/".$neededfontfile)) {
if (is_file($rootdir."/assets/fonts/".$neededfontfile)) {
$chartfontfile = $neededfontfile;
} else {
Yii::app()->setFlashMessage(sprintf(gT('The fonts file %s was not found in <limesurvey root folder>/fonts directory. Please, see the txt file for your language in fonts directory to generate the charts.'), $neededfontfile), 'error');
Expand Down
File renamed without changes.
File renamed without changes.
Expand Up @@ -2,4 +2,4 @@ For package size reasons the TlwgTypist font to show Thai characters in the stat
is not included with LimeSurvey.

Please download it from http://linux.thai.net/projects/fonts-tlwg ,
unzip and put the TlwgTypist.tff file into the /fonts directory of your LimeSurvey installation.
unzip and put the TlwgTypist.tff file into the /assets/fonts/ directory of your LimeSurvey installation.
Expand Up @@ -2,4 +2,4 @@ For package size reasons the UnBatang font to show Chinese characters in the sta
is not included with LimeSurvey.

Please download it from http://kldp.net/projects/unfonts/ ,
unzip and put the UnBatang.tff file into the /fonts directory of your LimeSurvey installation.
unzip and put the UnBatang.tff file into the /assets/fonts directory of your LimeSurvey installation.
6 changes: 6 additions & 0 deletions assets/fonts/fireflysung - Chinese.ttf.txt
@@ -0,0 +1,6 @@
For package size reasons the Firefly Sung font to show Chinese characters in the statistics graphs
is not included with LimeSurvey.

Please download it http://www.study-area.org/apt/firefly-font/fireflysung-1.3.0.tar.gz ,
unzip and put the fireflysung.tff file into the /assets/fonts directory of your LimeSurvey installation.

116 changes: 0 additions & 116 deletions assets/fonts/font-src/DejaVuSans - CREDITS

This file was deleted.

Binary file removed assets/fonts/font-src/DejaVuSans.ttf
Binary file not shown.
6 changes: 0 additions & 6 deletions assets/fonts/font-src/fireflysung - Chinese.ttf.txt

This file was deleted.

Expand Up @@ -2,4 +2,4 @@ For package size reasons the migmix-1p-regular.ttf font to show Japanese charact
is not included with LimeSurvey.

Please download it from http://mix-mplus-ipa.sourceforge.jp/migmix/ ,
unzip and put the migmix-1p-regular.ttf file into the /fonts directory of your LimeSurvey installation.
unzip and put the migmix-1p-regular.ttf file into the /assets/fonts directory of your LimeSurvey installation.

2 comments on commit 01c7555

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If i remind DejaVu have a lot of language , more than FreeSans (tested … a lot of year ago …),

We use it (by default) for ar, cs etc …

'ar'=>'dejavusans', // 'dejavusans' work but maybe more characters in aealarabiya or almohanad: but then need a dynamic font size too

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oups … sorry sorry : 37ac015 :)

Please sign in to comment.