- This topic has 7 replies, 3 voices, and was last updated 4 years, 1 month ago by Matthias.
-
AuthorPosts
-
February 4, 2020 at 1:58 am #1153773Michiel
Hi there,
I purchased a font (Linotype Didot) and followed all the instructions on
https://docs.generatepress.com/article/adding-local-fonts/I used FilleZilla to place the fonts in my uploads directory
http://dev2.ontwerppartners.nl/wp-content/uploads/2020/01(They don’t show up in my media library)
Next I changed CSS and added:
@font-face {
font-family: Linotype-Didot;
font-style: normal;
font-weight: 400;
src: url(‘http://dev1.ontwerppartners.nl/wp-content/uploads/2020/01/3AF15D_0_0.eot’);
src: local(‘Linotype-Didot’), local (‘Linotype-Didot’),
url(‘http://dev2.ontwerppartners.nl/wp-content/uploads/2020/01/3AF15D_0_0.eot’) format(’embedded-opentype’), /* IE6-IE8 */
url(‘http://dev2.ontwerppartners.nl/wp-content/uploads/2020/01/3AF15D_0_0.woff2’) format(‘woff2’), /* Super Modern Browsers */
url(‘http://dev2.ontwerppartners.nl/wp-content/uploads/2020/01/3AF15D_0_0.woff’) format(‘woff’), /* Modern Browsers */
url(‘http://dev2.ontwerppartners.nl/wp-content/uploads/2020/01/3AF15D_0_0.ttf’) format(‘truetype’), /* Safari, Android, iOS */
}Next I changed gereate-fonts.php and added:
add_filter( ‘generate_typography_default_fonts’, function( $fonts ) {
$fonts[] = ‘Linotype-Didot’;return $fonts;
} );Back in the customizer I now can select Linotype-didot.
But… where the font is used (in the header-element on home) there is now a blank space…February 4, 2020 at 2:22 am #1153792Matthiasi just tried the same – for me the error was in the url. From what i see you have dev1 and dev2 in the urls. Maybe thats a mistake – but you should check. If i remember right i had http instead of https.
February 4, 2020 at 2:32 am #1153797MichielHello Matthias, thanks for this and indeed, I have used both dev1 and dev2. I have adjusted the CSS to dev2, unfortunately this gives no improvement and I don’t see the font appearing yet.
Kind regards, Michiel.
February 4, 2020 at 5:46 am #1153957DavidStaffCustomer SupportHi there,
could be the font name – try this:
font-family: 'DidotLTStd-Roman';
February 4, 2020 at 5:58 am #1153972Matthiasout of curiosity i checked how the font looks on fonts-adobe. If i looked at the right one – on the bottom it says:
font-family: linotype-didot, serif;
font-style: normal;
font-weight: 400;So maybe also try the name without capitalization.
February 4, 2020 at 6:11 am #1153990MichielHi David,
We’re almost ready, it shows on most of the browser accept in Chrome on my MAC. But when I tell Safari to behave like Chrome on a MAC, it is also shown
February 4, 2020 at 6:27 am #1154008DavidStaffCustomer SupportDid you update the filter ? ie
add_filter( 'generate_typography_default_fonts', function( $fonts ) { $fonts[] = 'DidotLTStd-Roman'; return $fonts; } );
And made sure that was selected in the Customizer
February 4, 2020 at 6:52 am #1154226Matthiasdavid may know this better (i am only a trial and error user) – but this doesn’t ring a bell for me. I added it to functions.php of my childtheme.
“Next I changed gereate-fonts.php and added:” -
AuthorPosts
- You must be logged in to reply to this topic.