Skip to content

Commit ebc9168

Browse files
AtkinsSJkalenikaliaksandr
authored andcommitted
LibWeb/Layout: Add FIXMEs where we're using the wrong font
It's not clear how to address these right now, so add a FIXME to make them easier to find and address later.
1 parent 00302b5 commit ebc9168

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Libraries/LibWeb/Layout/BlockFormattingContext.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,6 +1207,7 @@ void BlockFormattingContext::ensure_sizes_correct_for_left_offset_calculation(Li
12071207
if (marker_text.is_empty()) {
12081208
marker_state.set_content_width(image_width + default_marker_width);
12091209
} else {
1210+
// FIXME: Use per-code-point fonts to measure text.
12101211
auto text_width = marker.first_available_font().width(marker_text);
12111212
marker_state.set_content_width(image_width + CSSPixels::nearest_value_for(text_width));
12121213
}

Libraries/LibWeb/Layout/SVGFormattingContext.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ void SVGFormattingContext::layout_nested_viewport(Box const& viewport)
307307
Gfx::Path SVGFormattingContext::compute_path_for_text(SVGTextBox const& text_box)
308308
{
309309
auto& text_element = static_cast<SVG::SVGTextPositioningElement const&>(text_box.dom_node());
310+
// FIXME: Use per-code-point fonts.
310311
auto& font = text_box.first_available_font();
311312
auto text_contents = text_element.text_contents();
312313
Utf8View text_utf8 { text_contents };
@@ -349,6 +350,7 @@ Gfx::Path SVGFormattingContext::compute_path_for_text_path(SVGTextPathBox const&
349350
if (!path_or_shape)
350351
return {};
351352

353+
// FIXME: Use per-code-point fonts.
352354
auto& font = text_path_box.first_available_font();
353355
auto text_contents = text_path_element.text_contents();
354356
Utf8View text_utf8 { text_contents };

0 commit comments

Comments
 (0)