mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Use Utf16String in CanvasText APIs
This is prep work for getting rid of UTF-8 text shaping.
This commit is contained in:
parent
5bd867f1dc
commit
434bf30cda
Notes:
github-actions[bot]
2025-09-21 11:24:04 +00:00
Author: https://github.com/awesomekling
Commit: 434bf30cda
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6254
Reviewed-by: https://github.com/tcl3
6 changed files with 26 additions and 26 deletions
|
|
@ -70,8 +70,8 @@ public:
|
|||
virtual void stroke() override;
|
||||
virtual void stroke(Path2D const& path) override;
|
||||
|
||||
virtual void fill_text(StringView, float x, float y, Optional<double> max_width) override;
|
||||
virtual void stroke_text(StringView, float x, float y, Optional<double> max_width) override;
|
||||
virtual void fill_text(Utf16String const&, float x, float y, Optional<double> max_width) override;
|
||||
virtual void stroke_text(Utf16String const&, float x, float y, Optional<double> max_width) override;
|
||||
|
||||
virtual void fill(StringView fill_rule) override;
|
||||
virtual void fill(Path2D& path, StringView fill_rule) override;
|
||||
|
|
@ -87,7 +87,7 @@ public:
|
|||
|
||||
virtual CanvasRenderingContext2DSettings get_context_attributes() const override { return m_context_attributes; }
|
||||
|
||||
virtual GC::Ref<TextMetrics> measure_text(StringView text) override;
|
||||
virtual GC::Ref<TextMetrics> measure_text(Utf16String const&) override;
|
||||
|
||||
virtual void clip(StringView fill_rule) override;
|
||||
virtual void clip(Path2D& path, StringView fill_rule) override;
|
||||
|
|
@ -147,10 +147,10 @@ private:
|
|||
|
||||
RefPtr<Gfx::FontCascadeList const> font_cascade_list();
|
||||
|
||||
PreparedText prepare_text(ByteString const& text, float max_width = INFINITY);
|
||||
PreparedText prepare_text(Utf16String const&, float max_width = INFINITY);
|
||||
|
||||
[[nodiscard]] Gfx::Path rect_path(float x, float y, float width, float height);
|
||||
[[nodiscard]] Gfx::Path text_path(StringView text, float x, float y, Optional<double> max_width);
|
||||
[[nodiscard]] Gfx::Path text_path(Utf16String const&, float x, float y, Optional<double> max_width);
|
||||
|
||||
Gfx::Color clear_color() const;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue