1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00

LibWeb: Make factory method of HTML::TextMetrics fallible

This commit is contained in:
Kenneth Myhra 2023-02-15 19:12:53 +01:00 committed by Linus Groh
parent d9845bb24b
commit c5de2c3348
3 changed files with 5 additions and 4 deletions

View file

@ -377,7 +377,7 @@ JS::NonnullGCPtr<TextMetrics> CanvasRenderingContext2D::measure_text(DeprecatedS
// TextMetrics object with members behaving as described in the following
// list:
auto prepared_text = prepare_text(text);
auto metrics = TextMetrics::create(realm());
auto metrics = TextMetrics::create(realm()).release_value_but_fixme_should_propagate_errors();
// FIXME: Use the font that was used to create the glyphs in prepared_text.
auto& font = Platform::FontPlugin::the().default_font();