Issue with rendering external fonts which declared bold (font-style: bold)



  • Hi,
    I have an issue with external fonts defined with font-face : font declared as bold (font-style: bold) doesn't rendered as bold; here's my test html:

    @<html><head>
    <title>Font test</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <style type="text/css">

            body {
                margin:0;
                padding:0;
                background-color:white;
                color:black;
                -webkit-font-smoothing: antialiased;
            }
    
            
            @font-face{  
                font-family:'LiberationRegular';  
                src:url('LiberationSerif-Regular.ttf');
            }
            
    
            @font-face{  
                font-family:'LiberationBold';  
                font-weight:bold;
                font-style:bold;
                src:
                /*local('Liberation Serif'), */
                url('LiberationSerif-Bold.ttf');
            }
    
        &lt;/style&gt;
    
    &lt;/head&gt;
    &lt;body&gt;
        <p>
        (TimesNewRoman) Lorem Ipsum is simply dummy text of the printing and typesetting 
        industry.
        </p>
    
        &lt;!--if uncomment this, all texts become normal(not bold) in Windows; in Ubuntu it always normal !
        <p>
        (LiberationSerifRegular) Lorem Ipsum is simply dummy text of the printing and typesetting 
        industry.
        </p>
        --&gt;
    
        <p>
        (liberationSerifBold) Lorem Ipsum is simply dummy text of the printing and typesetting 
        industry.
        </p>
    
    &lt;/body&gt;
    

    </html>@

    This html always rendered as normal (not bold) in Ubuntu (11.04 with Qt 4.7.2, 4.7.3, 4.7.4, 4.8.0; 10.04 with Qt4.7.2). But if I uncomment "local('Liberation Serif')" rule, html rendered with bold font. So issue appears only with external fonts.

    Of course, this page rendered correctly with Chrome, Firefox, IE. It even rendered correctly in QtWebKit based browsers on Windows XP (I've tested it with Arora) until second paragraph stays commented. If I uncomment this, third paragraph becomes normal (not bold).

    "Here's a link to tar with test page and font files":http://db.tt/ruuVx9Jl

    Is this a bug in QtWebKit or something wrong with my html (I'm a not web developer)?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.