Use multiple saved fonts based on language | XM Community
Skip to main content
Question

Use multiple saved fonts based on language


Forum|alt.badge.img+5
  • Level 2 ●●
  • 19 replies

Hi, 

I have multiple fonts files saved in the Library. 

On a survey I’m using I would like to add in the ‘Look & Feel’ external CSS a code that will override ONLY IN SOME LANGUAGES the default font and will choose the font from my library (the code I guess will contain a URL). 

 

Anyone ever done that?

 

(@vgayraud  I’m tagging you here, as it seems you have lot’s of knowledge when it comes to these tricks… and you just saved my life in another post)

3 replies

Forum|alt.badge.img+5
  • Author
  • Level 2 ●●
  • 19 replies
  • January 27, 2024

@Tom_1842 maybe you have an idea how to solve this issue?


Forum|alt.badge.img+20
  • QPN Level 5 ●●●●●
  • 290 replies
  • January 29, 2024

@deveer if you have a short survey consisting of few questions then you can try adding font style manually to that specific language you want.

 


Tom_1842
Level 8 ●●●●●●●●
Forum|alt.badge.img+28
  • Level 8 ●●●●●●●●
  • 876 replies
  • January 29, 2024

omkarkewat's method should work here. If they are custom fonts, you could also try getting the URLs of the tff files saved to your Qualtrics library by clicking "View file", then right click "View", then "Copy link address". Then try adding the below to the HTML/Source view "<>" of the survey's Header in the General section of the Look & Feel, updating the URLs with the ones from your library. On every page of the survey, the fonts will be loaded and then JavaScript will check the language code and adjust the font of everything on the screen accordingly.

<style type="text/css">
@font-face{
font-family: 'GermanFont';
src: url('https://yourbrand.az1.qualtrics.com/ControlPanel/File.php?F=F_noaKODhAR1TITgy');
}

@font-face{
font-family: 'SpanishFont';
src: url('https://yourbrand.az1.qualtrics.com/ControlPanel/File.php?F=F_E1GvXe828MpXP40');
}
</style>
<script>

if("${e://Field/Q_Language}" == "DE") {

jQuery("*").css({"font-family":"GermanFont"});

}

if("${e://Field/Q_Language}" == "ES-ES") {

jQuery("*").css({"font-family":"SpanishFont"});

}

</script>

 


Leave a Reply