- Messages : 1872
- Karma: 119
- Remerciements reçus 512
Include new fonts in Limesurvey
- Ben_V
-
- Hors Ligne
- Platinum Lime
-
Réduire
Plus d'informations
il y a 4 ans 4 mois #101875
par Ben_V
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):
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)
Ben_V a répondu au sujet : Include new fonts in Limesurvey
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
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)
Les utilisateur(s) suivant ont remercié: first
Connexion ou Créer un compte pour participer à la conversation.
- first
-
- Hors Ligne
- Platinum Lime
-
Réduire
Plus d'informations
- Messages : 353
- Karma: 15
- Remerciements reçus 38
il y a 4 ans 4 mois #101887
par first
Survey Designer and Programmer
first a répondu au sujet : Include new fonts in Limesurvey
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
Survey Designer and Programmer
Connexion ou Créer un compte pour participer à la conversation.
- DenisChenu
-
- Hors Ligne
- LimeSurvey Community Team
-
Réduire
Plus d'informations
- Messages : 8878
- Karma: 400
- Remerciements reçus 1469
il y a 4 ans 4 mois #101896
par DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
DenisChenu a répondu au sujet : Include new fonts in Limesurvey
Hi,
You can use :lang() pseudo selector.
www.w3.org/International/questions/qa-css-lang
Denis
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
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Les utilisateur(s) suivant ont remercié: first
Connexion ou Créer un compte pour participer à la conversation.
- Ben_V
-
- Hors Ligne
- Platinum Lime
-
Réduire
Plus d'informations
- Messages : 1872
- Karma: 119
- Remerciements reçus 512
il y a 4 ans 4 mois - il y a 4 ans 4 mois #101903
par Ben_V
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)
Ben_V a répondu au sujet : Include new fonts in Limesurvey
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
(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' />)
.
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
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)
Dernière édition: il y a 4 ans 4 mois par Ben_V.
Les utilisateur(s) suivant ont remercié: first
Connexion ou Créer un compte pour participer à la conversation.