skia2/modules/skplaintexteditor
Herb Derby 45313d1ce3 Replace SK_ARRAY_COUNT with std::size() for skia/modules
* Changed one static_assert to SkASSERT in RangeSelector.cpp:42

Change-Id: I12815a8817816261bb30f5412432109ed46826fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551892
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2022-06-23 15:15:21 +00:00
..
app Replace SK_ARRAY_COUNT with std::size() for skia/modules 2022-06-23 15:15:21 +00:00
include Enable ClangTidy check llvm-namespace-comment. 2020-08-06 19:07:52 +00:00
src Fix -Wunused-but-set-variable warnings 2022-04-29 15:20:59 +00:00
BUILD.gn Separate general defaults from Skia defaults 2021-03-22 15:30:56 +00:00
README.md SkPlainTextEditor: from experimental to modules 2019-08-27 20:32:19 +00:00

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