Qt-4.8 WebKit + qtwebkit-2.3.x Some records supported on CSS3 Web fonts

Source: Internet
Author: User

  TTF (TrueType)
Chrome notoginseng Firefox IE 8
0 0
OTF (Open Type) 0 0 0
WOFF 0 0 0
SVG 0
local () 0
EOT 0
woff 2.0

Font files in TTF/OTF format are supported by the Web fonts default;

Woff need to open a conditional macro, no problem
EOT is dedicated to IE

SVG needs enabled enable (svg_fonts), the problem is that the end link times are wrong:


g++-fuse-ld=gold-wl,--gc-sections-wl,--no-undefined-wl,-o1-wl,-rpath,/home/cteng/qt48/webkitbuild/release/lib- Wl,-rpath,/opt/browser13/qt/lib-o. /.. /bin/qttestbrowser obj/release/qtinitializetestfonts.o obj/release/locationedit.o obj/release/launcherwindow.o obj /RELEASE/MAIN.O obj/release/mainwindow.o obj/release/urlloader.o obj/release/utils.o obj/release/webpage.o obj/ RELEASE/WEBVIEW.O obj/release/fpstimer.o obj/release/cookiejar.o OBJ/RELEASE/MOC_LOCATIONEDIT.O obj/release/moc_ LAUNCHERWINDOW.O obj/release/moc_mainwindow.o obj/release/moc_urlloader.o obj/release/moc_webinspector.o obj/ RELEASE/MOC_WEBPAGE.O obj/release/moc_webview.o obj/release/moc_fpstimer.o obj/release/moc_cookiejar.o obj/release /qrc_qttestbrowser.o-l/home/cteng/qt48/webkitbuild/release/lib-l/opt/browser13/qt/plugins/platforms-l/opt/ browser13/qt/plugins/generic-l/opt/browser13/qt/lib-l/usr/x11r6/lib-lqtwebkit-lgio-2.0-lgstapp-0.10- Lgstpbutils-0.10-lgstvideo-0.10-lgstaudio-0.10-lgstbase-0.10-lgstINTERFACES-0.10-PTHREAD-LGSTFFT-0.10-LM-LGSTREAMER-0.10-LGOBJECT-2.0-LGMODULE-2.0-LGTHREAD-2.0-LRT-LXML2- Lglib-2.0-lqtsql-l/opt/browser13/qt/lib-lqtxmlpatterns-lqtopengl-l/usr/lib/i386-linux-gnu-lqtgui-lqtnetwork- lqtcore-lglesv2-lpthread 
/home/cteng/qt48/webkitbuild/release/lib/libqtwebkit.so:undefined reference to ' Webcore::glyphpagetreenode:: Getroot (unsigned int) '
/home/cteng/qt48/webkitbuild/release/lib/libqtwebkit.so:undefined reference to ' Webcore::glyphpagetreenode:: Getchild (webcore::fontdata const*, unsigned int) '
/home/cteng/qt48/webkitbuild/release/lib/libqtwebkit.so:undefined reference to ' Webcore::widthiterator:: Widthiterator (Webcore::font const*, Webcore::textrun const&, Wtf::hashset<webcore::simplefontdata const*, WTF ::P trhash<webcore::simplefontdata const*>, Wtf::hashtraits<webcore::simplefontdata const*> >*, BOOL, BOOL) '
/home/cteng/qt48/webkitbuild/release/lib/libqtwebkit.so:undefined reference to ' Webcore::font:: Glyphdataforcharacter (unsigned int, bool, webcore::fontdatavariant) const '
/home/cteng/qt48/webkitbuild/release/lib/libqtwebkit.so:undefined reference to ' WebCore:: Surrogatepairawaretextiterator::surrogatepairawaretextiterator (unsigned short const*, int, int, int) '
/home/cteng/qt48/webkitbuild/release/lib/libqtwebkit.so:undefined reference to ' Webcore::widthiterator::advance ( int, webcore::glyphbuffer*) '
/home/cteng/qt48/webkitbuild/release/lib/libqtwebkit.so:undefined reference to ' Webcore::simplefontdata:: Widthforglyph (unsigned short) const '
/home/cteng/qt48/webkitbuild/release/lib/libqtwebkit.so:undefined reference to ' Webcore::font:: Glyphdataandpageforcharacter (unsigned int, bool, webcore::fontdatavariant) const '
/home/cteng/qt48/webkitbuild/release/lib/libqtwebkit.so:undefined reference to ' WebCore:: surrogatepairawaretextiterator::advance (unsigned int) '
/home/cteng/qt48/webkitbuild/release/lib/libqtwebkit.so:undefined reference to ' WebCore:: Surrogatepairawaretextiterator::consume (unsigned int&, unsigned int&) '


Further investigation found that the function relies on the Qrawfont feature, which is not supported on qt-4.8:


#if! (PLATFORM (QT) &&! Have (Qrawfont))
always_inline floatrect simplefontdata::boundsforglyph (Glyph Glyph) const

if (Iszerowidthspaceglyph (glyph))
return Floatrect ();

floatrect bounds;
if (m_glyphtoboundsmap) {
bounds = m_glyphtoboundsmap->metricsforglyph (glyph);
if (bounds.width ()! = Cglyphsizeunknown)
return bounds;
    } 

bounds = platformboundsforglyph (glyph);
if (!m_glyphtoboundsmap)
M_glyphtoboundsmap = adoptptr (new glyphmetricsmap<floatrect>);
m_glyphtoboundsmap->setmetricsforglyph (glyph, bounds);
return bounds;


always_inline float simplefontdata::widthforglyph(Glyph Glyph) const

if (Iszerowidthspaceglyph (glyph))
return 0;

Float width = m_glyphtowidthmap.metricsforglyph (glyph);
if (width! = cglyphsizeunknown)
return width;

if (m_fontdata)
width = m_fontdata->widthforsvgglyph (Glyph, M_platformdata.size ());
#if ENABLE (opentype_vertical)
else if (m_verticaldata)
#if Use (CG) | | Use (CAIRO) | | PLATFORM (WX) | | Use (Skia_on_mac_chromium)
width = m_verticaldata->advanceheight (this, glyph) + M_syntheticboldoffset;
#else
width = m_verticaldata->advanceheight (this, glyph);
#endif
#endif
Else
width = platformwidthforglyph (glyph);

m_glyphtowidthmap.setmetricsforglyph (glyph, width);
return width;

#endif//Have (Qrawfont)



Qt-4.8 WebKit + qtwebkit-2.3.x Some records supported on CSS3 Web fonts

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.