Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:
  • Seite:
  • 1
  • 2

THEMA: Include new fonts in Limesurvey

Include new fonts in Limesurvey 1 Jahr 1 Monat her #98313

  • Mazi
  • Mazis Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 5324
  • Dank erhalten: 294
  • Karma: 249
ajparag schrieb:
Here is the link to automate translations:

www.limesurvey.org/en/forum/can-i-do-thi...lating-surveys#98306
Please add this information to our manual at manual.limesurvey.org/Workarounds:_Furth..._by_LimeSurvey_users.
The forum is cleaned up regularly, so sooner or later your valuable solution might get lost. Therefore, the manual is the better place.

Thanks!

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Include new fonts in Limesurvey 9 Monate 1 Woche her #101855

  • trivender
  • trivenders Avatar
  • OFFLINE
  • Expert Lime
  • Beiträge: 142
  • Dank erhalten: 6
  • Karma: 6
Hi,

I have gone through all following points

A. Install all new fonts in the Computer/ Server
B. Add language folders in ~\htdocs\locale
C. Go to ~\htdocs\application\helpers and insert commands for the desired languages in SurveyRuntimeHelper.php
D. Go to ~\ htdocs\third_party\ckeditor\_source\plugins\font and edit Plugin.js file using notepad++. Press ctrl+f and search for ‘verdana’. Add all the fonts that you have installed in step A.
E. Go to ~\htdocs\third_party\ckeditor and edit ckeditor.js file using notepad++. Press ctrl+f and search for ‘verdana’. Add all the fonts that you have installed in step A.

but I am not getting desired font in my language. Please see attached screenshot
ss.JPG
Trivender Singh
Survey Designer and Programmer
"I always suggest to have a group by group display layout and create a seprate group for each question. This will be extra work but you will get flexiblity to create your question by using more than more lime survey question types."
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Include new fonts in Limesurvey 9 Monate 1 Woche her #101862

  • holch
  • holchs Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 2640
  • Dank erhalten: 313
  • Karma: 115
Well, one error would be that in your CSS the respective font is referenced at the end of font-family. The browser will start from the first font in the list, check if it is there, if yes, use it, if not move to the next. So to give priority to your font, it needs to be at the beginning of the list.

However, this font looks very strange and I doubt that many people will have it installed on their computer. However, CSS like this only works with fonts installed on the computer of the user. Therefor you will need to use very common fonts to make sure they are available on the computer of all users. Otherwise it looks good on your computer, but for all others it will look like in your example.

You might want to have a look into web-fonts. There are approaches that allow you to use fonts that are not installed on the users computer.

The fonts uploaded to the server are usually for the applications that create images.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Include new fonts in Limesurvey 9 Monate 1 Woche her #101868

  • trivender
  • trivenders Avatar
  • OFFLINE
  • Expert Lime
  • Beiträge: 142
  • Dank erhalten: 6
  • Karma: 6
Dear,

I know what you told be . I want to know which file I should edit so that my ttf will be infront of all all other ttf
Trivender Singh
Survey Designer and Programmer
"I always suggest to have a group by group display layout and create a seprate group for each question. This will be extra work but you will get flexiblity to create your question by using more than more lime survey question types."
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Include new fonts in Limesurvey 9 Monate 1 Woche her #101872

  • holch
  • holchs Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 2640
  • Dank erhalten: 313
  • Karma: 115
Sorry, then I don't understand what you are trying to do.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Include new fonts in Limesurvey 9 Monate 1 Woche her #101875

  • Ben_V
  • Ben_Vs Avatar
  • OFFLINE
  • Platinum Lime
  • Beiträge: 1068
  • Dank erhalten: 235
  • Karma: 74
I want to know which file I should edit...

Hi,
You have to edit related CSS rules the most of the time into template.css; Order fonts into "font-family" declarations (priority fonts first):
@font-face
{
font-family: MyCustomFont;
src: url('MyCustomFont.ttf'),
     url('MyCustomFont.eot'); /* for IE9 */
}
* {font-family:'MyCustomFont',Courier,System,Terminal,Consolas}
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: trivender

Include new fonts in Limesurvey 9 Monate 1 Woche her #101887

  • trivender
  • trivenders Avatar
  • OFFLINE
  • Expert Lime
  • Beiträge: 142
  • Dank erhalten: 6
  • Karma: 6
Thank you Ben, you suggestion will work perfectly if my survey is in only one custum language. But my survey is in 4 languages each having custom font. My question is how can make each language custom font as priorty font when I run survey in that language. I dont want to hardcode any one font highest priority
Trivender Singh
Survey Designer and Programmer
"I always suggest to have a group by group display layout and create a seprate group for each question. This will be extra work but you will get flexiblity to create your question by using more than more lime survey question types."
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Include new fonts in Limesurvey 9 Monate 1 Woche her #101896

  • DenisChenu
  • DenisChenus Avatar
  • OFFLINE
  • Moderator Lime
  • Beiträge: 6276
  • Dank erhalten: 801
  • Karma: 241
Hi,

You can use :lang() pseudo selector.

www.w3.org/International/questions/qa-css-lang
:lang(en) {font-family:'MyCustomFontEn',Courier,System,Terminal,Consolas}
:lang(fr) {font-family:'MyCustomFontFr',Courier,System,Terminal,Consolas}

Denis
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: trivender

Include new fonts in Limesurvey 9 Monate 1 Woche her #101903

  • Ben_V
  • Ben_Vs Avatar
  • OFFLINE
  • Platinum Lime
  • Beiträge: 1068
  • Dank erhalten: 235
  • Karma: 74
In addition of Denis's solution you can also:

1) Use the {LANG} keyword and add (startpage.pstpl) a link to an extra .CSS file, where you will just set or change the font-familly.
eg. <link rel='stylesheet' type='text/css' media='all' href='yourinstall.com/templates/yourtemplate/font_{LANG}.css' />


2) Change the font into the survey description field using jquery
<script type="text/javascript">
$(document).ready(function(){
$( "<style type='text/css'>"
+"* { font-family:MyCustomFont !IMPORTANT }"
+"</style>").appendTo( "head" );
});
</script>

(NOTE: it's not very W3C compliant but if you prefer you can directly insert a link to an additional stylesheet in the description field without use of javascript:
<link rel='stylesheet' type='text/css' media='all' href='yourinstall.com/templates/yourtemplate/MyCustomFont.css' />)
.
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
Letzte Änderung: 9 Monate 1 Woche her von Ben_V.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: trivender
  • Seite:
  • 1
  • 2
Moderatoren: ITEd
Ladezeit der Seite: 0.290 Sekunden
Donation Image