Sign in to follow this  
LycaonX

Lightweight html rendering support

Recommended Posts

I've been looking around for weeks for a small, lightweight method of rendering html in a c++ project. The application is only 1.1 megs and I am not willing to use something like Qt which would inflate the distribution by approximately 500% (if I include the single Qt dll, even more if the inclusion requires other core dlls). I ran across HTMLayout from terrainformatica.com which is great, but the author is adamant about not distributing a full static lib instead of the stub lib which requires an external dll. I personally have nothing against using dlls, but the distribution model of the app makes adding and maintaining additional files a pain as well as not allowing obfuscation of the component, which I'd like to do just because without access to the source code of the HTMLayout I have no way to personally check and/or modify it to guarantee that there are no blatantly exploitable flaws in it.

I'm aware of the htmlite.dll that is distrubuted with the Visual Studio installer (I think) and although it is much smaller, it's missing a couple 'nice' features that HTMLayout has.

Do any of you have any leads I can follow up on?

Ideally I'd love a full static lib, no external dll dependency, preferably less than a meg or so, and at least basic support of pure HTML rendering. CSS support would be a great plus but it's not necessary. Does something like this exist aside from HTMLayout.dll? It can't be the only lightweight HTML rendering engine but for the life of me I can't seem to find anything else.

Share this post


Link to post
Share on other sites
I doubt you'll find anything smaller. Mozilla's rendering engine is about 20 meg.

Though to be honest, when your [b]phone[/b] has a few gigabytes of storage and can download that in under a minute, I have to wonder why even a 2000% increase is any concern.

Share this post


Link to post
Share on other sites
Do it like everyone else - embed IE ActiveX control or just open a system default browser.

[quote]Ideally I'd love a full static lib, no external dll dependency, preferably less than a meg or so, and at least basic support of pure HTML rendering. CSS support would be a great plus but it's not necessary.[/quote]
This is the main problem. Everyone needs just 20% of functionality, but they can't agree on which 20%.

HTML is complex, arcane, illogical and not fully supported even in current browser versions, and they get millions in funding. There is no lightweight component unless you're looking at HTML 3.0.

[quote]I have to wonder why even a 2000% increase is any concern.[/quote]App store size limits? Memory limits? Ability to run directly off a network share? Target demographic doesn't have broadband? Metered internet?

HP is a good example of this mentality. Why is my printer driver 370MB? Why does it come with separate uninstaller which is 3 MB? Oh, and then there's separate versions, so think gigabytes just to support a couple of machines and two or three different generations of printers.

Share this post


Link to post
Share on other sites
[quote name='Telastyn' timestamp='1298298077' post='4777024']
I doubt you'll find anything smaller. Mozilla's rendering engine is about 20 meg.

Though to be honest, when your [b]phone[/b] has a few gigabytes of storage and can download that in under a minute, I have to wonder why even a 2000% increase is any concern.
[/quote]

Because it's a game that I'd like to add basic browser functionality to, not a browser that I'd like to add basic game functionality to. I'm not sure what point you had in replying if you neither offered any suggestions, or anything at all constructive for that matter.

Also, if you'd have read my post I did mention I found two such libraries, both of which weigh in at under 1 meg, much smaller than 20. So your reply is completely useless and uninformative.

InvalidPointer: Thanks for the heads up, a quick glance at the page says that's at least close to what I'm looking for. At the very least, it gives me some more terms to Google with if that specific solution isn't feasible.

But there's source so it's definitely worth checking out :)

Share this post


Link to post
Share on other sites
[quote name='LycaonX' timestamp='1298322318' post='4777207']
[quote name='Telastyn' timestamp='1298298077' post='4777024']
I doubt you'll find anything smaller. Mozilla's rendering engine is about 20 meg.

Though to be honest, when your [b]phone[/b] has a few gigabytes of storage and can download that in under a minute, I have to wonder why even a 2000% increase is any concern.
[/quote]

Because it's a game that I'd like to add basic browser functionality to, not a browser that I'd like to add basic game functionality to. I'm not sure what point you had in replying if you neither offered any suggestions, or anything at all constructive for that matter.

Also, if you'd have read my post I did mention I found two such libraries, both of which weigh in at under 1 meg, much smaller than 20. So your reply is completely useless and uninformative.
[/quote]

Thank you for that [i]considerate [/i]reply.

You mentioned that you found some libraries that kinda sorta did some layout. I figure that if you actually wanted to do web browsing, you might need something a little more complete. My suggestion was to stop with the asinine size limitations. If you want the functionality, that comes with a cost.

We're not talking about printer drivers here. 20 megs is nothing if you actually want support for anything more than plain old html (read: most of the web).


Too many people come to these forums with a dozen hard and fast requirements... it needs to be small, it needs to run in linux, it should support OpenGL and DirectX, it [i]has[/i] to be open source/free... Solving the problem at hand is hard enough without giving yourself more roadblocks. You want to integrate a web browser? Use the IE activeX control or gecko.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this