PDA

View Full Version : Issue with rendering fonts in windows



ejoshva
12th August 2015, 07:42
I am trying to load the .html page which has verdana-bold is set as the font-face.
In mac system, this font is rendered just as expected but in windows the font is not picked.

Kindly let me if there is something which can be done to make the font rendered.

Saw a link where in to render the font - phanthomjs (https://github.com/ariya/phantomjs/issues/10592) was asked to be installed

anda_skoa
12th August 2015, 08:40
If you manually create a QFont object, is it the font you expect?
If not, check if QFontDatabase even knows about it.
If not, check if the system has it installed.

It might also make a difference which component you load the HTML into.

I don't think phantomjs is any use here, it is a framework for testing web sites based on webkit, designed to operate in non-visual mode (automated tests).
The link you have in your post also does not suggest installing phantomjs at all, it is about getting certain fonts to be used by phantomjs.

Cheers,
_

ejoshva
12th August 2015, 09:27
actually, the font used to display the text in html page is not picked.

the font-face is specified in the css related to the html.
The font made use of is installed in the system.

And regarding Phanthomjs, what you said is correct. My comment is misleading.


I am loading the html page in QGraphicsWebView.

ejoshva
12th August 2015, 11:29
kindly let me know which font will be supported in QGraphicsWebView for displaying text
according Qt 5.1 release (https://wiki.qt.io/New_Features_in_Qt_5.1) WOFF fonts are supported.
But in windows alone it's not rendering