libui/Font: Use RefString
All checks were successful
Build and test / build (push) Successful in 1m54s

This commit is contained in:
apio 2024-09-07 16:52:48 +02:00
parent 1fc2da4fb0
commit 0a9578c1ec
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -7,7 +7,7 @@
*
*/
#include <luna/String.h>
#include <luna/RefString.h>
#include <os/File.h>
#include <ui/Font.h>
@ -49,8 +49,8 @@ namespace ui
Result<SharedPtr<Font>> Font::load_builtin(StringView name, FontWeight weight)
{
auto path = TRY(String::format("/usr/share/fonts/%s-%s.psf"_sv, name.chars(),
weight == FontWeight::Bold ? "Bold" : "Regular"));
auto path = TRY(RefString::format("/usr/share/fonts/%s-%s.psf"_sv, name.chars(),
weight == FontWeight::Bold ? "Bold" : "Regular"));
return load(path.view());
}