Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:
  • Page:
  • 1
  • 2

TOPIC: Include new fonts in Limesurvey

Include new fonts in Limesurvey 3 years 1 month ago #98272

  • ajparag
  • ajparag's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 15
  • Thank you received: 2
  • Karma: 1
I want to include new fonts in limesurvey. How do I achieve that? I have copied the fonts in the htdocs/fonts folder but still they are not visible in the editor (i.e. when I am writing in the limesurvey editor). I want my fonts to get listed in the editor of limesurvey. Please let me know how can I do it.

Note: I have copied .ttf files inside htdocs/fonts folder.
Last Edit: 3 years 1 month ago by ajparag.
The administrator has disabled public write access.

Include new fonts in Limesurvey 3 years 1 month ago #98278

  • ajparag
  • ajparag's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 15
  • Thank you received: 2
  • Karma: 1
Can somebody help me with this? Please!
The administrator has disabled public write access.

Include new fonts in Limesurvey 3 years 1 month ago #98285

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1805
  • Thank you received: 445
  • Karma: 111
Hello,
I suppose you have to apply some changes somewhere into the following (sub)directories:
/third_party/ckeditor/
/third_party/ckeditor/_source/plugins/font/

Backup your changes because those files may be overwritten during a major update of the software
Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
All LS releases => bit.ly/1VMuTDu | 2.06lts => bit.ly/1Qv44A1
Demo surveys => bit.ly/20NW9V8 (already included in /docs/demosurveys)
The administrator has disabled public write access.

Include new fonts in Limesurvey 3 years 1 month ago #98286

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5101
  • Thank you received: 756
  • Karma: 227
I don't know what you want this for, but as the editor is involved I assuem that it is for the templates.

I think those new fonts will only work for the creation of images and locally.

If you want to change the appearance of the templates for example, you'll better use webfonts or something, because not everyone will have the same fonts on your computer.
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!
The administrator has disabled public write access.

Include new fonts in Limesurvey 3 years 1 month ago #98287

  • ajparag
  • ajparag's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 15
  • Thank you received: 2
  • Karma: 1
Hi Ben,
I tried playing with the plugin.js file inside /third_party/ckeditor/_source/plugins/font folder. I edited the following:

CKEDITOR.config.font_names = 'Verdana Test1/Verdana, Geneva, sans-serif';

I modified the above command. Added/ removed entries but nothing happened. What do I need to do in addition to above to get through. I am quite sure that your method will work. Only thing is I am missing something. Please help me!
The administrator has disabled public write access.

Include new fonts in Limesurvey 3 years 1 month ago #98288

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1805
  • Thank you received: 445
  • Karma: 111
it's unclear for me if you want a specific font available for survey(s) or just change the look of the backend admin....

If it's only for some surveys, the easiest way is probably creating a custom template ( .css + finding a place for your .tff file)...
Even if you new font is not displayed in the admin, it will be ok for the survey.
Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
All LS releases => bit.ly/1VMuTDu | 2.06lts => bit.ly/1Qv44A1
Demo surveys => bit.ly/20NW9V8 (already included in /docs/demosurveys)
The administrator has disabled public write access.

Include new fonts in Limesurvey 3 years 1 month ago #98289

  • ajparag
  • ajparag's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 15
  • Thank you received: 2
  • Karma: 1
Update!

I got the fonts listed in the editor. Here is what I did.

I opened and edited ckeditor.js in notepad++. pressed ctrl+f and searched for 'verdana'

Then in the same command line I added the fonts I wanted to add. To my surprise it did show up in the editor.

But the sad news is...
Now that I have edited both plugin.js and ckeditor.js files I was hoping that my font will work but it is not.

Let me give a context - I am trying to run fonts of different languages in the ckeditor. I am trying to install hindi language font (kruti dev ttf) in the editor so that I can automate translations. I will just extract the english version of the survey, translate it in an excel sheet and replace the english font in the excel with the language font I have installed in ckeditor. And my survey is translated (Yes, I will have to replace the statements with translated ones).
Am I trying too hard? Is it possible or not?
The administrator has disabled public write access.

Include new fonts in Limesurvey 3 years 1 month ago #98290

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1805
  • Thank you received: 445
  • Karma: 111
Am I trying too hard? Is it possible or not?
I think almost everything is possible with LS, depending on your skill, your time and ...some lucky help ;)

It's the end of the good news because I've no idea of how you can achieve this! Hope someone help here can give you a couple of advices.
Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
All LS releases => bit.ly/1VMuTDu | 2.06lts => bit.ly/1Qv44A1
Demo surveys => bit.ly/20NW9V8 (already included in /docs/demosurveys)
The administrator has disabled public write access.

Include new fonts in Limesurvey 3 years 1 month ago #98291

  • ajparag
  • ajparag's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 15
  • Thank you received: 2
  • Karma: 1
Update! Mission accomplished. With a minor tweak in wordings, i am able to install all fonts. Ben... i am grateful to you. Thank you so much! hats off to you!

May be in a day or two i will post a topic on how one can save large amount of time in translating surveys.
The administrator has disabled public write access.

Include new fonts in Limesurvey 3 years 1 month ago #98307

  • ajparag
  • ajparag's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 15
  • Thank you received: 2
  • Karma: 1
Here is the link to automate translations:

www.limesurvey.org/en/forum/can-i-do-thi...lating-surveys#98306
The administrator has disabled public write access.

Include new fonts in Limesurvey 3 years 1 month ago #98313

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5984
  • Thank you received: 368
  • Karma: 260
ajparag wrote:
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'"
The administrator has disabled public write access.

Include new fonts in Limesurvey 2 years 9 months ago #101855

  • OMdev
  • OMdev's Avatar
  • Offline
  • Platinum Lime
  • Posts: 328
  • Thank you received: 35
  • Karma: 15
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
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."
The administrator has disabled public write access.

Include new fonts in Limesurvey 2 years 9 months ago #101862

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5101
  • Thank you received: 756
  • Karma: 227
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!
The administrator has disabled public write access.

Include new fonts in Limesurvey 2 years 9 months ago #101868

  • OMdev
  • OMdev's Avatar
  • Offline
  • Platinum Lime
  • Posts: 328
  • Thank you received: 35
  • Karma: 15
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
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."
The administrator has disabled public write access.

Include new fonts in Limesurvey 2 years 9 months ago #101872

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5101
  • Thank you received: 756
  • Karma: 227
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!
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.548 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form