Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Schrifteinbettung mit @font-face

More
4 years 6 months ago #212466 by Guido_Schaffrin
Hallo in die Runde,

ich baue gerade eine Umfrage auf und will über die Custom.css eigene fonts einbinden. die Einträge in das CSS lauten:

@font-face {
  font-family: "CenturyGothicStd";
  font-weight: normal;
  font-style: normal;  
  src: url("CenturyGothicStd.eot"); /* IE9 Compat Modes */
  src: local('CenturyGothicStd'), local('Century Gothic Std'),
  src: url("./fonts/CenturyGothicStd.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
    url("./fonts/CenturyGothicStd.svg") format("svg"), /* Legacy iOS */
    url("./fonts/CenturyGothicStd.ttf") format("truetype"), /* Safari, Android, iOS */
    url("./fonts/CenturyGothicStd.woff") format("woff"), /* Modern Browsers */
    url("./fonts/CenturyGothicStd.woff2") format("woff2"); /* Modern Browsers */
}

/* Century Gothic Std - Italic */
@font-face {
  font-family: "CenturyGothicStd";
  font-weight: normal;
  font-style: italic;  
  src: url("CenturyGothicStd-Italic.eot"); /* IE9 Compat Modes */
  src: local('CenturyGothicStd-Italic'), local('Century Gothic Std Italic'),
    url("CenturyGothicStd-Italic.eotCenturyGothicStd-Italic.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
    url("CenturyGothicStd-Italic.eotCenturyGothicStd-Italic.eot?#iefixCenturyGothicStd-Italic.svg") format("svg"), /* Legacy iOS */
    url("CenturyGothicStd-Italic.eotCenturyGothicStd-Italic.eot?#iefixCenturyGothicStd-Italic.svgCenturyGothicStd-Italic.ttf") format("truetype"), /* Safari, Android, iOS */
    url("CenturyGothicStd-Italic.eotCenturyGothicStd-Italic.eot?#iefixCenturyGothicStd-Italic.svgCenturyGothicStd-Italic.ttfCenturyGothicStd-Italic.woff") format("woff"), /* Modern Browsers */
    url("CenturyGothicStd-Italic.eotCenturyGothicStd-Italic.eot?#iefixCenturyGothicStd-Italic.svgCenturyGothicStd-Italic.ttfCenturyGothicStd-Italic.woffCenturyGothicStd-Italic.woff2") format("woff2"); /* Modern Browsers */
}



/* Century Gothic Std - Bold */
@font-face {
  font-family: "CenturyGothicStd";
  font-weight: bold;
  font-style: normal;
  src: url("CenturyGothicStd-Bold.eot"); /* IE9 Compat Modes */
  src: local('CenturyGothicStd-Bold'), local('Century Gothic Std Bold'),
    url("CenturyGothicStd-Bold.eotCenturyGothicStd-Bold.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
    url("CenturyGothicStd-Bold.eotCenturyGothicStd-Bold.eot?#iefixCenturyGothicStd-Bold.svg") format("svg"), /* Legacy iOS */
    url("CenturyGothicStd-Bold.eotCenturyGothicStd-Bold.eot?#iefixCenturyGothicStd-Bold.svgCenturyGothicStd-Bold.ttf") format("truetype"), /* Safari, Android, iOS */
    url("CenturyGothicStd-Bold.eotCenturyGothicStd-Bold.eot?#iefixCenturyGothicStd-Bold.svgCenturyGothicStd-Bold.ttfCenturyGothicStd-Bold.woff") format("woff"), /* Modern Browsers */
    url("CenturyGothicStd-Bold.eotCenturyGothicStd-Bold.eot?#iefixCenturyGothicStd-Bold.svgCenturyGothicStd-Bold.ttfCenturyGothicStd-Bold.woffCenturyGothicStd-Bold.woff2") format("woff2"); /* Modern Browsers */

}

/* Century Gothic Std - BoldItalic */
@font-face {
  font-family: "CenturyGothicStd";
  font-weight: bold;
  font-style: italic;
  src: url("CenturyGothicStd-BoldItalic.eot"); /* IE9 Compat Modes */
  src: local('CenturyGothicStd-BoldItalic'), local('Century Gothic Std Bold Italic'),
  src: url("./fonts/CenturyGothicStd-BoldItalic.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
    url("./fonts/CenturyGothicStd-BoldItalic.svg") format("svg"), /* Legacy iOS */
    url("./fonts/CenturyGothicStd-BoldItalic.ttf") format("truetype"), /* Safari, Android, iOS */
    url("./fonts/CenturyGothicStd-BoldItalic.woff") format("woff"), /* Modern Browsers */
    url("./fonts/CenturyGothicStd-BoldItalic.woff2") format("woff2"); /* Modern Browsers */

}

Im Inspector werden mir die korrekten font-family-Zuweisungen Ordnungsgemäß angezeigt, die fonts jedoch nicht ausgelifert. die fonts liegen in dem Ordner "fonts" im CSS-Ordner des CSS.
Lime-Survey CE, neuste Version.
PHP 7.4
Hier gehts zur Survey

 
The topic has been locked.
More
4 years 6 months ago #212473 by holch
Kein Experte auf dem Gebiet, aber was ist denn die URL deines Ordners wo die fonts liegen? Deine Pfadangaben sehen für mich sehr fragwürdig aus, die würde ich mir mal genauer ansehen.

Im allgemeinen scheinst du es nicht so mit Pfadangaben zu haben, denn deine URL zur Umfrage führt auch ins nichts. Kann ja auch nicht funktionieren bei so einer Pfadangabe:
Code:
https://index.php/629132?lang=de

;-)

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
4 years 6 months ago #212479 by Guido_Schaffrin
Oh ja, danke für den Stupser .... der Link war nicht der einzige Flüchtigkeitsfehler ;-)

Ich habe die CSS-Anweisung neu geschrieben – und jetzt gehts
The topic has been locked.
Moderators: holchJoffmtpartner

Lime-years ahead

Online-surveys for every purse and purpose