Wsparcie » Motywy » Polskie znaki w motywie Tempera

  • Anzelm

    (@anzelm)


    Witam,
    mam problem z polskimi znakami w motywie Tempera. Mianowicie nie wyświetlają się one w tytule strony (tym na górnym pasku przeglądarki) oraz w podtytule na samej stronie. Jestem zielony w temacie i będę wdzięczny za pomoc.

    Adres strony: http://wuttkezwieczorkiem.bo.pl/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Kurdupel

    (@kurdupel)

    Cześć.

    Problem w Twoim przypadku polega na tym, że czcionkę która używasz w tytule strony „Open Sans Light” jak i wszystkie inne choćby w tytule wpisów , masz zaimplementowane na stronie. Dokładniej mówiąc wszystkie czcionki, z których korzysta strona znajdują się na Twoim serwerze. Domniemam więc, że nie zawierają one polskich znaków.

    Korzystasz z takich czcionek:
    Droid Sans,
    Ubuntu Light,
    Ubuntu,
    Open Sans,
    Open Sans Light,
    Bebas Neue,
    Yanone Kaffeesatz Regular,
    Yanone Kaffeesatz Light,
    Oswald Light,
    Oswald

    Przyznam szczerze, że trochę dużo 😉

    Problem u Ciebie na stronie głównej leży w dwóch czcionkach: „Open Sans Light” i „Yanone Kaffesatz Regular”. Otwórz w tym celu plik fontfaces.css znajdujący się w folderze fonts i usuń następujące kody:

    @font-face {
        font-family: 'Open Sans';
        src: url('OpenSans-Regular-webfont.eot');
        src: url('OpenSans-Regular-webfont.eot?#iefix') format('embedded-opentype'),
             url('OpenSans-Regular-webfont.woff') format('woff'),
             url('OpenSans-Regular-webfont.ttf') format('truetype'),
             url('OpenSans-Regular-webfont.svg#OpenSansRegular') format('svg');
        font-weight: normal;
        font-style: normal;
    
    }
    
    @font-face {
        font-family: 'Open Sans Light';
        src: url('OpenSans-Light-webfont.eot');
        src: url('OpenSans-Light-webfont.eot?#iefix') format('embedded-opentype'),
             url('OpenSans-Light-webfont.woff') format('woff'),
             url('OpenSans-Light-webfont.ttf') format('truetype'),
             url('OpenSans-Light-webfont.svg#OpenSansLight') format('svg');
        font-weight: normal;
        font-style: normal;
    
    }
    
    @font-face {
        font-family: 'Yanone Kaffeesatz Regular';
        src: url('yanonekaffeesatz-regular-webfont.eot');
        src: url('yanonekaffeesatz-regular-webfont.eot?#iefix') format('embedded-opentype'),
             url('yanonekaffeesatz-regular-webfont.woff') format('woff'),
             url('yanonekaffeesatz-regular-webfont.ttf') format('truetype'),
             url('yanonekaffeesatz-regular-webfont.svg#yanone_kaffeesatzregular') format('svg');
        font-weight: normal;
        font-style: normal;
    
    }

    W tym samym pliku na samej górze, <u>podkreślam</u> na samej górze wklej kod odnoszący do tych samych czcionek z http://google.com/fonts</a:

    @import url(http://fonts.googleapis.com/css?family=Open+Sans:300|Yanone+Kaffeesatz&subset=latin,latin-ext);

    Teraz otwórz plik header.php i w style znajdź:

    .widget-title, .widget-title a { line-height: normal; font-family: Open Sans Light; } .entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6, #comments #reply-title, .nivo-caption h2, #front-text1 h1, #front-text2 h1, .column-header-image { font-family: Open Sans Light; }

    Zmień Open Sans Light na Open Sans i dodaj font-weight:300. Tak ma to wyglądać:

    .widget-title, .widget-title a { line-height: normal; font-family: Open Sans; font-weight:300;} .entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6, #comments #reply-title, .nivo-caption h2, #front-text1 h1, #front-text2 h1, .column-header-image { font-family: Open Sans; font-weight:300 }

    Podobnie zrób z czcionką Yanone… Zmień „Yanone Kaffesatz Regular” na „Yanone Kaffeesatz”:

    Usuń:
    #content h1.entry-title a, #content h2.entry-title a, #content h1.entry-title , #content h2.entry-title { font-family: Yanone Kaffeesatz Regular; } .#site-title span a { font-family: Yanone Kaffeesatz Regular; }

    Wklej:
    #content h1.entry-title a, #content h2.entry-title a, #content h1.entry-title , #content h2.entry-title { font-family: Yanone Kaffeesatz; } .#site-title span a { font-family: Yanone Kaffeesatz; }

    Możesz także pobrać te czcionki i przerobić je na polskie znaki, a następnie wgrać je na serwer.

    Thread Starter Anzelm

    (@anzelm)

    Serdecznie dzięki za pomoc, pierwszą część zrobiłem bez problemu (edycja pliku fontfaces.css). Mam za to problem z dalszą częścią – tzn. z plikiem header.php, a mianowicie nie ma w nim takiego kodu jak ten który mówisz żeby usunąć. Cały mój header.php wygląda tak:

    <?php
    /**
     * The Header
     *
     * Displays all of the <head> section and everything up till <div id="main">
     *
     * @package Cryout Creations
     * @subpackage tempera
     * @since tempera 0.5
     */
     ?><!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <title><?php wp_title( '-', true, 'right' ); ?></title>
    <?php  cryout_meta_hook(); ?>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" />
    <link rel="profile" href="http://gmpg.org/xfn/11" />
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    <?php
     	cryout_header_hook();
    	wp_head(); ?>
    </head>
    <body <?php body_class(); ?>>
    
    <?php cryout_body_hook(); ?>
    
    <div id="wrapper" class="hfeed">
    <div id="topbar" ><div id="topbar-inner"> <?php cryout_topbar_hook(); ?> </div></div>
    <?php cryout_wrapper_hook(); ?>
    
    <div id="header-full">
    	<header id="header">
    <?php cryout_masthead_hook(); ?>
    		<div id="masthead">
    			<div id="branding" role="banner" >
    				<?php cryout_branding_hook();?>
    				<?php cryout_header_widgets_hook(); ?>
    				<div style="clear:both;"></div>
    			</div><!-- #branding -->
    			<a id="nav-toggle"><span> </span></a>
    			<nav id="access" role="navigation">
    				<?php cryout_access_hook();?>
    			</nav><!-- #access -->
    		</div><!-- #masthead -->
    	</header><!-- #header -->
    </div><!-- #header-full -->
    
    <div style="clear:both;height:0;"> </div>
    
    <div id="main">
    		<?php cryout_main_hook(); ?>
    	<div  id="forbottom" >
    		<?php cryout_forbottom_hook(); ?>
    
    		<div style="clear:both;"> </div>
    
    		<?php cryout_breadcrumbs_hook();?>
    Kurdupel

    (@kurdupel)

    Sorry, że tak długo się nie odzywałem, ale to efekt tego, że wiadomości od wordpress.org trafiały na spamu. – Dopiero dziś to odkryłem.

    Pobrałem Twój szablon i sprawdziłem w czym problem. Wejdź do panelu administracyjnego, a następnie „WYGLĄD”, dalej „TEMPRA SETTING” i dalej „CZCIONKA”. Znajdź CZCIONKA NAGŁÓWKÓW i w polu LUB CZCIONKA GOOGLE wklej nazwę Open Sans. Czcionki Google znajdziesz na http://www.google.com/fonts

    Thread Starter Anzelm

    (@anzelm)

    Wielkie dzięki 🙂 wydaje mi się, że już wszystko działa jak powinno 😀

    Moderator Marcin Pietrzak

    (@iworks)

    Cześć Anzelm

    Sprawdź to: http://iworks.pl/2014/08/15/filtr-dnia-style_loader_src-czyli-zawsze-polskie-znaki/

    powinno pomóc, jeżeli dany krój ma w sobie polskie znaki diakrytyczne.

    Pozdrawiam,
    Marcin

Viewing 5 replies - 1 through 5 (of 5 total)
  • Temat ‘Polskie znaki w motywie Tempera’ jest zamknięty na nowe odpowiedzi.