ich benutze im CMS verschiedene Templates (teilweise sehr abgewandelt).
Mein Problem war, dass ich in jedem Template die Schriftdateien speichern musste (auch neue).
Jetzt sind die Schriftarten in einem zentralen Ordner 'CMSroot/fonts' angelegt und ich kann nun von meinen Templates darauf zugreifen:
Code: Select all
/*#####################################################*/
/* Schriften DOR: hinzugefuegt
/*#####################################################*/
@font-face {font-family: Caveat-Regular; font-style: normal; font-weight: 400; src:url("../../fonts/Caveat-Regular.ttf") format("truetype");}
@font-face {font-family: Tangerine-Bold; font-style: normal; font-weight: 400; src:url("../../fonts/Tangerine-Bold.ttf") format("truetype");}
@font-face {font-family: Tangerine-Regular; font-style: normal; font-weight: 400; src:url("../../fonts/Tangerine-Regular.ttf") format("truetype");}
@font-face {font-family: SpecialElite; font-style: normal; font-weight: 400; src:url("../../fonts/SpecialElite-Regular.ttf") format("truetype");}
@font-face {font-family: Raleway; font-style: normal; font-weight: 500; src:url("../../fonts/Raleway.ttf") format("truetype");}
/* SUPERTEST - Die Schrift habe ich mit 'wget https://www.gaumenfreundin.de/wp-content/themes/yootheme-child/fonts/DingDong.woff' runtergezogen und dem geht!!! Danach .woff in .ttf umgewandelt */
@font-face {
font-family: 'DingDong'; font-style: normal; font-weight: 400;
src: url("../../fonts/DingDong.woff2") format("woff2"),
url("../../fonts/DingDong.woff") format("woff"),
url("../../fonts/DingDong-Regular.ttf") format("truetype");
}
BTW: ich habe mir alle Google-Fonts herunter geladen. Ist zwar manchmal Schrott drin und man muss sich durch 1,3 GB Schriftarten durchbuddeln, aber was solls...
Um die neue Schriftart in TinyMCE als Auswahl gebrauchen zu können, muss man in 'CMSroot/plugins/tinymce/inits/init_full.js' die Schriftart hinzufüegen. In diesem Fall 'DingDong'.
Code: Select all
font_formats: "Arial=arial,helvetica,sans-serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;DingDong=DingDong;Fraktur Kleist=KleistFraktur,serif;Fraktur Normal=NormalFraktur,serif;Georgia=georgia,times new roman,serif;Helvetica=helvetica,arial,sans-serif;RobotoCondensed=RobotoCondensed,Arial,sans-serif;SpecialElite=SpecialElite;Tahoma=tahoma,arial,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,sans-serif",
Gruß
Gonzo