[webkit-qt] QtWebKit + Qt 4.8.5 embedded + fonts

Massimo Callegari massimocallegari at yahoo.it
Thu Oct 3 11:36:39 PDT 2013


Ok, great !
Thank you very much Adam

Il 03/10/2013 19:35, Coda Highland ha scritto:
> Look at QWebSettings::setFontFamily(). It's pretty simple.
> Alternatively, you could define a user stylesheet in your qrc with a
> rule like:
>
> * { font-family: DejaVu Sans !important }
>
> and set it using QWebSettings::setUserStylesheetUrl().
>
> Documentation: http://qt-project.org/doc/qt-4.8/qwebsettings.html
>
> /s/ Adam
>
> On Thu, Oct 3, 2013 at 9:06 AM, Massimo Callegari
> <massimocallegari at yahoo.it> wrote:
>> Thanks for the hint Adam.
>> I wasn't actually sure about that site. I think the only reliable way to get
>> the installed font list is through Flash or Java.
>>
>> I'll have a look into font substitution rules. If in case you've got a quick
>> code snippet to share I would be thankful. :)
>>
>> Cheers,
>> Massimo
>>
>> ________________________________
>> Da: Coda Highland <chighland at gmail.com>
>> A: Massimo Callegari <massimocallegari at yahoo.it>
>> Cc: Allan Sandfeld Jensen <kde at carewolf.com>; "webkit-qt at lists.webkit.org"
>> <webkit-qt at lists.webkit.org>
>> Inviato: Giovedì 3 Ottobre 2013 17:50
>>
>> Oggetto: Re: [webkit-qt] QtWebKit + Qt 4.8.5 embedded + fonts
>>
>> Also: It's probably using Bitstream Vera Sans as its default font. If
>> you change your default font to DejaVu (or add a font substitution
>> rule) then that should do the trick.
>>
>> /s/ Adam
>>
>> On Thu, Oct 3, 2013 at 8:50 AM, Coda Highland <chighland at gmail.com> wrote:
>>> I think you misunderstand what Flipping Typical does. It doesn't
>>> actually measure what fonts you have installed -- it polls a list of
>>> "popular" fonts. The fonts you have installed are probably not on the
>>> list.
>>>
>>> /s/ Adam
>>>
>>> On Thu, Oct 3, 2013 at 8:25 AM, Massimo Callegari
>>> <massimocallegari at yahoo.it> wrote:
>>>> OK, thanks.
>>>> Then I don't understand why it seems to detect only one font.
>>>>
>>>> These are the font families that Qt detects: ("Bitstream Vera Sans",
>>>> "Bitstream Vera Sans Mono", "Bitstream Vera Serif", "DejaVu Sans",
>>>> "DejaVu
>>>> Sans Mono", "DejaVu Serif", "fixed", "helvetica", "micro", "unifont")
>>>>
>>>> Is there any test suite that I can run to debug this behaviour ?
>>>>
>>>> Thanks,
>>>> Massimo
>>>>
>>>> ________________________________
>>>> Da: Allan Sandfeld Jensen <kde at carewolf.com>
>>>> A: webkit-qt at lists.webkit.org; Massimo Callegari
>>>> <massimocallegari at yahoo.it>
>>>> Inviato: Giovedì 3 Ottobre 2013 17:13
>>>> Oggetto: Re: [webkit-qt] QtWebKit + Qt 4.8.5 embedded + fonts
>>>>
>>>> On Thursday 03 October 2013, Massimo Callegari wrote:
>>>>> Does it mean it won't use fontconfig for Qt embedded systems ? If so, is
>>>>> there a particular reason for it ? What is the correct way to tell
>>>>> QtWebkit where to look for fonts or to retrieve them from Qt ?
>>>>>
>>>> No, this dependency is only for the automated tests. QtWebKit does not
>>>> use
>>>> fontconfig directly. It uses Qt's fontdatabase and should have the exact
>>>> same
>>>> fonts.
>>>>
>>>> `Allan
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> webkit-qt mailing list
>>>> webkit-qt at lists.webkit.org
>>>> https://lists.webkit.org/mailman/listinfo/webkit-qt
>>>>
>>



More information about the webkit-qt mailing list