mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:47:45 +00:00
LibGfx: Make Font::width() return a float
This commit is contained in:
parent
b9d2b8f7b2
commit
3407ab0fd1
25 changed files with 40 additions and 40 deletions
|
@ -10,12 +10,12 @@
|
|||
|
||||
namespace Gfx {
|
||||
|
||||
int ScaledFont::width(StringView view) const { return unicode_view_width(Utf8View(view)); }
|
||||
int ScaledFont::width(Utf8View const& view) const { return unicode_view_width(view); }
|
||||
int ScaledFont::width(Utf32View const& view) const { return unicode_view_width(view); }
|
||||
float ScaledFont::width(StringView view) const { return unicode_view_width(Utf8View(view)); }
|
||||
float ScaledFont::width(Utf8View const& view) const { return unicode_view_width(view); }
|
||||
float ScaledFont::width(Utf32View const& view) const { return unicode_view_width(view); }
|
||||
|
||||
template<typename T>
|
||||
ALWAYS_INLINE int ScaledFont::unicode_view_width(T const& view) const
|
||||
ALWAYS_INLINE float ScaledFont::unicode_view_width(T const& view) const
|
||||
{
|
||||
if (view.is_empty())
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue