radkovo / CSSBox

CSSBox is an (X)HTML/CSS rendering engine written in pure Java. Its primary purpose is to provide a complete information about the rendered page suitable for further processing. However, it also allows displaying the rendered document.
http://cssbox.sourceforge.net/
GNU Lesser General Public License v3.0
234 stars 76 forks source link

Rendering at a higher resolution #22

Open tlrobinson opened 8 years ago

tlrobinson commented 8 years ago

I'm using CSSBox to render some HTML/CSS to PNGs and would like to render at double the resolution for higher resolution displays (i.e. Retina).

I've looked through the docs and haven't found anything obvious to allow this, but maybe I'm overlooking something. The only option I've found so far is to change all sizes to ems (rems don't seem to work) and set the body font-size to double.

radkovo commented 8 years ago

Unfortunately, this is not directly supported now. As a possible solution, I would suggest the following:

I might support this in the future but CSSBox needs lots of other improvements so I am not sure when I would get to that.

elfprince13 commented 8 years ago

@tlrobinson I've done some preliminary work on an OpenGL based renderer, in Scala, using LWJGL for the OpenGL bindings. If you're interested in collaborating to get it in better working order, I'd be happy to do so. There's definitely still a lot of work to be done, but I think it would be a worthwhile time investment.

soundasleep commented 2 years ago

@elfprince13 An OpenGL-based renderer using LWJGL is exactly what I'm looking for. Do you still have that preliminary work floating around? How far did you get?

elfprince13 commented 2 years ago

I have no recollection whatsoever of the status I left this in, but you can find my preliminary setup here (for Scala 2.11): https://github.com/elfprince13/FreeBuild/tree/master/net/cemetech/sfgp/freebuild/boxui

If you use that as a starting point for anything useful, please give credit appropriately.

elfprince13 commented 2 years ago

I think at some point I also tried hacking the GraphicsRenderer class to use https://github.com/brandonborkholder/glg2d