mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-20 16:28:54 +00:00
LibWeb/Painting: Use GlyphRun font for measuring selection rectangle
We incorrectly used the first available font to measure this before, which may or may not be the correct font for this text.
This commit is contained in:
parent
7a0c675f45
commit
e457252c97
Notes:
github-actions[bot]
2024-12-06 01:58:40 +00:00
Author: https://github.com/AtkinsSJ
Commit: e457252c97
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2796
4 changed files with 10 additions and 9 deletions
|
@ -39,8 +39,8 @@ public:
|
|||
RefPtr<Gfx::GlyphRun> glyph_run() const { return m_glyph_run; }
|
||||
Gfx::Orientation orientation() const;
|
||||
|
||||
CSSPixelRect selection_rect(Gfx::Font const&) const;
|
||||
CSSPixelRect range_rect(Gfx::Font const&, size_t start_offset, size_t end_offset) const;
|
||||
CSSPixelRect selection_rect() const;
|
||||
CSSPixelRect range_rect(size_t start_offset, size_t end_offset) const;
|
||||
|
||||
CSSPixels width() const { return m_size.width(); }
|
||||
CSSPixels height() const { return m_size.height(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue