788b91678f
Use std::min and std::max everywhere. SkTPin still exists. We can't use std::clamp yet, and even when we can, it has undefined behavior with NaN. SkTPin is written to ensure that we return a value in the [lo, hi] range. Change-Id: I506852a36e024ae405358d5078a872e2c77fa71e Docs-Preview: https://skia.org/?cl=269357 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269357 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> |
||
---|---|---|
.. | ||
app | ||
include | ||
src | ||
BUILD.gn | ||
README.md |
Editor
This is an experimental Editor layer that abstracts out SkShaper text layeout for easy embedding into an application. The Editor layer is agnostic about the operating system.
+--------------------------------+
|Application |
+-+----+-------------------------+
| |
| |
| +-v-------------------------+
| |Editor |
| +-+----+--------------------+
| | |
| | |
| | +-v--------------------+
| | |SkShaper |
| | +-+--------+-----------+
| | | |
| | | |
+-v----v----v--+ +-v-----------+
|Skia | |HarfBuzz, ICU|
+--------------+ +-------------+
The Application layer must interact with the:
- Windowing system
- File system
- Clipboard
- Keyboard/mouse input.
Try it out:
tools/git-sync-deps
bin/gn gen out/default
ninja -C out/default editor
out/default/editor resources/text/english.txt
cat resources/text/*.txt > example.txt
out/default/editor example.txt