Giter Site home page Giter Site logo

alenstarx / litehtml Goto Github PK

View Code? Open in Web Editor NEW

This project forked from litehtml/litehtml

0.0 2.0 0.0 7.3 MB

Fast and lightweight HTML/CSS rendering engine

Home Page: http://www.litehtml.com/

License: BSD 3-Clause "New" or "Revised" License

CMake 0.14% C++ 26.02% C 66.25% CSS 0.24% Ragel 7.36%

litehtml's Introduction

What is litehtml?

litehtml is the lightweight HTML rendering engine with CSS2/CSS3 support. Note, litehtml itself does not draw any text, pictures or other graphics and litehtml does not depend of any image/draw/font library. You are free to use any library to draw images, fonts and any other graphics. litehtml just parses HTML/CSS and places the HTML elements into right position (renders HTML). To draw the html elemens you have to implement the simple callback interface document_container. This interface is really simple, check it! Note, the document_container implementation is required to render HTML correctly.

Where litehtml can be used

litehtml can be used when you need to show the html-formated texts or even to create a mini-browser, but the using full-featured html engine is not possible. Usually you don't need something like WebKit to show some html tooltips or html-formated text, litehtml is much better for these.

HTML Parser

litehtml uses the gumbo-parser to parse HTML. Gumbo is an implementation of the HTML5 parsing algorithm implemented as a pure C99 library with no outside dependencies. It's designed to serve as a building block for other tools and libraries such as linters, validators, templating languages, and refactoring and analysis tools.

Compatibility

litehtml is compatible with any platform suported C++ and STL. For Windows the MS Visual Studio 2013 is recommended. litehtml supports both utf-8 and unicode strings on Windows and utf-8 strings on Linux.

Support for HTML and CSS standards

Unfortunately litehtml is not fully compatible with HTML/CSS standards. There are lots of work to do to make litehtml as well as modern browsers. But litehtml supports most HTML tags and CSS properties. You can find the list of supported CSS properties in this table. In the most cases the html/css features supported by litehtml are enough. Right now litehtml supports the pages with very complex html/css designs. As example the pages created with bootstrap framework are usually well formated by litehtml.

Testing litehtml

You can download the simple browser (litebrowser) to test the litehtml rendering engine.

The litebrowser source codes are available on GitHub:

License

litehtml is distributed under New BSD License. The gumbo-parser is disributed under Apache License, Version 2.0

Support litehtml project

If you think litehtml is amazing please consider a small donation:

PayPal

Bitcoin: 1CS1174GVSLbP33TBp8RFwqPS6KmQK6kLY

BitCoin

litehtml's People

Contributors

arkarit avatar bigfatbrowncat avatar feliwir avatar gogoprog avatar jeroendeswaef avatar joesingo avatar nuclearcookie avatar readmecritic avatar tordex avatar vinzenz avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.