skia2/experimental/editor
Hal Canary e73aa75732 experimental/editor: up,down preserves x-coordinate
Bug: skia:9020
Change-Id: I009dead2e47d4d7d27ea383697a28c7569ffeaac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234318
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-08-13 17:46:08 +00:00
..
BUILD.gn experimental/editor: shape.h to unify all shaping code 2019-08-09 14:20:10 +00:00
editor_application.cpp experimental/editor/application: pre-shape text before showing window 2019-08-13 14:08:09 +00:00
editor.cpp experimental/editor: up,down preserves x-coordinate 2019-08-13 17:46:08 +00:00
editor.h experimental/editor: shape.h to unify all shaping code 2019-08-09 14:20:10 +00:00
README.md experimental/editor: README.md multilingual example 2019-08-13 13:55:19 +00:00
shape.cpp experimental/editor: shape.h to unify all shaping code 2019-08-09 14:20:10 +00:00
shape.h experimental/editor: shape.h to unify all shaping code 2019-08-09 14:20:10 +00:00
stringslice.cpp experimental/editor: progress on newlines 2019-06-24 17:24:35 +00:00
stringslice.h experimental/editor: interface no longer uses stringslice 2019-08-06 16:52:08 +00:00
stringview.h experimental/editor: interface no longer uses stringslice 2019-08-06 16:52:08 +00:00
word_boundaries.cpp experimental/editor: shape.h to unify all shaping code 2019-08-09 14:20:10 +00:00
word_boundaries.h experimental/editor: shape.h to unify all shaping code 2019-08-09 14:20:10 +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