[Support request] Installing own font does not work

Home Forums Support [Support request] Installing own font does not work

Home Forums Support Installing own font does not work

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1153773
    Michiel

    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…

    #1153792
    Matthias

    i 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.

    #1153797
    Michiel

    Hello 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.

    #1153957
    David
    Staff
    Customer Support

    Hi there,

    could be the font name – try this:

    font-family: 'DidotLTStd-Roman';

    #1153972
    Matthias

    out 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.

    #1153990
    Michiel

    Hi 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

    #1154008
    David
    Staff
    Customer Support

    Did 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

    #1154226
    Matthias

    david 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:”

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.