Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iafisher/browser-engineering
https://github.com/iafisher/browser-engineering
Last synced: 25 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/iafisher/browser-engineering
- Owner: iafisher
- Created: 2024-08-30T14:58:03.000Z (2 months ago)
- Default Branch: master
- Last Pushed: 2024-08-30T14:58:13.000Z (2 months ago)
- Last Synced: 2024-09-14T12:14:00.634Z (about 2 months ago)
- Language: Go
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Following along with [Web Browser Engineering](https://browser.engineering/), in Go.
You will need to download the PNG Color 72x72 emoji pack from [OpenMoji](https://openmoji.org/) and
place it in `assets/openmoji` to render emoji.To run tests:
```shell
$ go test ./internal
```## Structure
1. The **URL fetcher** resolves the URL (`http://`, `https://`, `file:///`, etc.) and fetches the resource. (`urlfetcher.go`)
2. The resource is passed to the **GUI** to be shown. (`gui.go`)
3. The GUI calls the **layout engine** to compute the position of elements. (`layoutengine.go`)
4. The GUI draws the elements from the layout engine on the screen.### URL fetcher
- HTTP request encoding
- HTTP request decoding
- TLS support (using the standard library)
- Other resources (`file:///`, `data:`, etc.)### GUI
- Using SDL2 to draw things on the screen
- Handling user interaction: scrolling, resizing### Layout engine
- Laying out text and elements
- Breaking long lines
- Positioning text based on font metrics