diff options
author | sin-ack <sin-ack@users.noreply.github.com> | 2021-12-30 22:15:38 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-01-04 22:41:07 +0000 |
commit | 9121cc7cae407e7d8a3e489f4df73ef400517c88 (patch) | |
tree | 5710d64074cdaac016d4f1ff04f7c6d7e7845907 /Userland/Libraries/LibWeb/Forward.h | |
parent | 732e41714a6f89d1462d672ae2b6efe911f082f4 (diff) | |
download | serenity-9121cc7cae407e7d8a3e489f4df73ef400517c88.zip |
LibWeb: Implement CanvasRenderingContext2D.measureText
This requires an implementation of the "text preparation algorithm" as
specified here:
html.spec.whatwg.org/multipage/canvas.html#text-preparation-algorithm
However, we're missing a lot of things such as the
CanvasTextDrawingStyles interface, so most of the algorithm was not
implemented. Additionally, we also are not able to use a LineBox like
the algorithm suggests, because our layouting infra is not up to the
task yet. The prepare_text function does nothing other than figuring out
the width of the given text and return glyphs with offsets at the
moment.
Diffstat (limited to 'Userland/Libraries/LibWeb/Forward.h')
-rw-r--r-- | Userland/Libraries/LibWeb/Forward.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Forward.h b/Userland/Libraries/LibWeb/Forward.h index 0ef1d9ece1..ee116ffa0a 100644 --- a/Userland/Libraries/LibWeb/Forward.h +++ b/Userland/Libraries/LibWeb/Forward.h @@ -208,6 +208,7 @@ class MessagePort; class PageTransitionEvent; class PromiseRejectionEvent; class SubmitEvent; +class TextMetrics; class WebSocket; } @@ -439,6 +440,7 @@ class SVGGraphicsElementWrapper; class SVGPathElementWrapper; class SVGSVGElementWrapper; class TextEncoderWrapper; +class TextMetricsWrapper; class TextWrapper; class UIEventWrapper; class URLConstructor; |