Include new fonts in Limesurvey

More
4 years 1 month ago - 4 years 1 month ago #98272 by ajparag
ajparag created the topic: Include new fonts in Limesurvey
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: 4 years 1 month ago by ajparag.

Please Log in to join the conversation.

More
4 years 1 month ago #98278 by ajparag
ajparag replied the topic: Include new fonts in Limesurvey
Can somebody help me with this? Please!

Please Log in to join the conversation.

More
4 years 1 month ago #98285 by Ben_V
Ben_V replied the topic: Include new fonts in Limesurvey
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
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)

Please Log in to join the conversation.

More
4 years 1 month ago #98286 by holch
holch replied the topic: Include new fonts in Limesurvey
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.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
4 years 1 month ago #98287 by ajparag
ajparag replied the topic: Include new fonts in Limesurvey
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!

Please Log in to join the conversation.

More
4 years 1 month ago #98288 by Ben_V
Ben_V replied the topic: Include new fonts in Limesurvey
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
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)

Please Log in to join the conversation.

More
4 years 1 month ago #98289 by ajparag
ajparag replied the topic: Include new fonts in Limesurvey
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?

Please Log in to join the conversation.

More
4 years 1 month ago #98290 by Ben_V
Ben_V replied the topic: Include new fonts in Limesurvey

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
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)

Please Log in to join the conversation.

More
4 years 1 month ago #98291 by ajparag
ajparag replied the topic: Include new fonts in Limesurvey
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.

Please Log in to join the conversation.

More
4 years 1 month ago #98307 by ajparag
ajparag replied the topic: Include new fonts in Limesurvey
Here is the link to automate translations:

www.limesurvey.org/en/forum/can-i-do-thi...lating-surveys#98306

Please Log in to join the conversation.

More
4 years 1 month ago #98313 by Mazi
Mazi replied the topic: Include new fonts in Limesurvey

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)survey-consulting.com'"

Please Log in to join the conversation.

More
3 years 8 months ago #101855 by first
first replied the topic: Include new fonts in Limesurvey
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
Attachments:

Please Log in to join the conversation.

More
3 years 8 months ago #101862 by holch
holch replied the topic: Include new fonts in Limesurvey
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.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
3 years 8 months ago #101868 by first
first replied the topic: Include new fonts in Limesurvey
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

Please Log in to join the conversation.

More
3 years 8 months ago #101872 by holch
holch replied the topic: Include new fonts in Limesurvey
Sorry, then I don't understand what you are trying to do.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

Did you already participate in our customer survey?

Don't miss your chance for great prices.

Please click here to participate:

Start now

Start now!

Just create your account and start using Limesurvey today.

Register now