Hello, I am working with mozilla embed and want to use the HTML rendering engine to get ordered chunks of text with font-family info and any other style info attached to the text nodes in the DOM that are used during rendering the text.
I've tried navigating the sources, to find if there are any c++ API to achieve this. I have found an API "GetStyleDataExternal" that can be called on nsIFrame const nsStyleStruct* pStyle = pIFrame- >GetStyleDataExternal(eStyleStruct_Font); //here pIFrame is of type nsIFrame* Is there any API that I can use on text nodes(of type nsITextContent) to get the associated font-family info)? Searching in mozilla.dev.tech.layout, I found a response to a similar query which mentioned something like: document.defaultView.getComputedStyle(node, "").fontFamily should work (translated into the language of your choice, of course). However I could not find any equivalent API in c++ for getting the font-family info out of a text node(or text content node). Does anyone have an idea about any such API? Any information or pointer to the right things to look for in the code are welcome :-) Thanks, -srivani _______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

