Go to file
Melroy van den Berg 7f76913183 Create Abstruct base class for renderer. Fix cppcheck. 2020-11-22 00:05:51 +01:00
.vscode Why does it take 40-50 ms to draw text, and especially set bold/italic... 2020-11-21 01:35:30 +01:00
cmake Add build & package phase 2020-11-19 04:04:52 +01:00
docs Create Abstruct base class for renderer. Fix cppcheck. 2020-11-22 00:05:51 +01:00
lib/commonmarker Fix build! 2020-11-20 23:41:12 +01:00
misc Look into curent dir for includes 2020-11-19 04:35:30 +01:00
scripts Add build script 2020-11-21 00:53:52 +01:00
src Create Abstruct base class for renderer. Fix cppcheck. 2020-11-22 00:05:51 +01:00
.gitignore Add build & package phase 2020-11-19 04:04:52 +01:00
.gitlab-ci.yml Fix ci paths 2020-11-21 00:45:33 +01:00
.gitmodules Checkout cmark again in lib 2020-11-13 01:56:29 +01:00
CMakeLists.txt Fix build! 2020-11-20 23:41:12 +01:00
LICENSE Add LICENSE 2020-11-19 03:36:38 +01:00
README.md Add lagecy CPP check, and swith between std includes 2020-11-21 00:21:30 +01:00
big.md Create Abstruct base class for renderer. Fix cppcheck. 2020-11-22 00:05:51 +01:00
check.sh Add ci 2020-11-15 04:51:00 +01:00
equation.md Add extra example 2020-11-13 18:55:03 +01:00
suppressions.txt Add ci 2020-11-15 04:51:00 +01:00
test.md Working bold, italic, heading, paragraph, listing, ...! 2020-11-19 02:44:30 +01:00

README.md

Browser for DWWW

Decentralized Browser; a revolution of the WWW.

What would you do, if you could reinvent The Internet in 21st century? With all the knowledge and new technologies available today.

I was inspired by Douglas Engelbart, Ted Nelson as well as projects like IPFS, Jekyll, ARPANET, and more.

Note: Project is WIP!

Ideas/Features

The current plan:

  • Everyone should be able to easily read and create a site/blog/news page and publish the content online (without minimal technical knowledge);
  • Built-in easy-to-use editor (whenever you want to publish some content without programming language knowledge);
  • Decentralized (no single failure or censorship), like: P2P, DHT and IPFS;
  • No client-server approach (the client is also the server and visa versa) - think mesh network.
  • Encrypted transfers;
  • Data is stored redundantly within the network (no single failure);
  • Versioning/revisions of content and documenents (automatically solves broken 'links', that can't happy anymore);
  • Publisher user should be able to add additional information about the document/page, eg. title or path (similar in how Jekyll is using the YML format for meta data)
  • Human-readable source-code (eg. Markdown, could be extended as well);
  • End-user is in control about the layout and styling (just like with e-books);
  • Content is King;
  • Fast and Extensible!

Note: Since HyperText (so is HTML) is not used, you can even ditch the HTTP protocol. However TLS, for encryption, can still be used.

Text on Screen Flowcharts

Prepare steps

(*) --> "Load fonts glyphs (ttf)/default font"
--> "Create Font Atlas"
--> "Create Viewport"
-->[Ready for render] (*)

Text rendering

(*) --> "Get file online /\nRead from disk"
-->[Content in memory] "Parse document"
-->[AST output] "Convert AST to Bitmap struct"
-->[Ready for painter] "Paint text on Viewport"
-->[Text visable on Screen] (*)

ttf = TrueType Font

AST = Abstract Syntax Tree

Devs

Decentralized Browser written in C and C++20. And using the cmark-gfm library, used for CommonMark (markdown) parsing.

The GUI-toolkit or 2D/3D engine used displaying the content is not yet decided. Can be anything really, like: Qt, wxWidgets or Imgui.

We can also still change the language of the source code (iso markdown). Atleast no HTML and JavaScript anymore, content is king after all.

For the development environment I'm using VSCodium with C/C++, Cmake and Cmake Tools extensions installed.

Depedencies

For the build you need at least:

  • GCC 9 or higher (GCC 8 should also work)
  • CMake
  • Qt (qt5-default package)

For Release packaging:

  • CPack

GUIs

Qt

Qt Rich Text Processing/QTextDocument can't be used, since that only supports HTML for rich text. Or the use of built-in markdown parser, in both cases doesn't give us the right flexibility we need.

Meaning we can try to use low-level QPainter calls on a viewport/paint device (like QPixmap, QWidget, QPicture and QOpenGLPaintDevice), see Qt GUI module. We can also use Qt Quick Scene Graph for OpenGL rendering. Or use 2D renderer using either raster paint engine (without OpenGL calls).

But first let's try using QGraphicsTextItem on a QGraphicsScene.

Examples:

By baysmith:

It generates image atlas dynamically using a QPainter to draw to a texture which is displayed with quads. I don't know how much less efficient it is to draw the characters to the image on demand rather than prebaking, but I need the flexibility to change the font to anything the system provides.
  • Calligra Word processor using Qt, maybe also creating their own text painting as well?

Dear Imgui

Imgui is used for Games but also applications. For example the Unity Editor is using Imgui!

For some inspiration; there exists Text Editor #1, Text Editor #2 created with Imgui.

But there are many more demos and projects out there using Imgui!

See also Fonts documentation of Imgui.