libui/Font: Use RefString
All checks were successful
Build and test / build (push) Successful in 1m54s
All checks were successful
Build and test / build (push) Successful in 1m54s
This commit is contained in:
parent
1fc2da4fb0
commit
0a9578c1ec
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <luna/String.h>
|
#include <luna/RefString.h>
|
||||||
#include <os/File.h>
|
#include <os/File.h>
|
||||||
#include <ui/Font.h>
|
#include <ui/Font.h>
|
||||||
|
|
||||||
@ -49,8 +49,8 @@ namespace ui
|
|||||||
|
|
||||||
Result<SharedPtr<Font>> Font::load_builtin(StringView name, FontWeight weight)
|
Result<SharedPtr<Font>> Font::load_builtin(StringView name, FontWeight weight)
|
||||||
{
|
{
|
||||||
auto path = TRY(String::format("/usr/share/fonts/%s-%s.psf"_sv, name.chars(),
|
auto path = TRY(RefString::format("/usr/share/fonts/%s-%s.psf"_sv, name.chars(),
|
||||||
weight == FontWeight::Bold ? "Bold" : "Regular"));
|
weight == FontWeight::Bold ? "Bold" : "Regular"));
|
||||||
|
|
||||||
return load(path.view());
|
return load(path.view());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user