mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
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.
This commit is contained in:
parent
00302b5b1e
commit
ebc91686b5
Notes:
github-actions[bot]
2024-12-06 01:58:22 +00:00
Author: https://github.com/AtkinsSJ
Commit: ebc91686b5
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2796
2 changed files with 3 additions and 0 deletions
|
@ -1207,6 +1207,7 @@ void BlockFormattingContext::ensure_sizes_correct_for_left_offset_calculation(Li
|
||||||
if (marker_text.is_empty()) {
|
if (marker_text.is_empty()) {
|
||||||
marker_state.set_content_width(image_width + default_marker_width);
|
marker_state.set_content_width(image_width + default_marker_width);
|
||||||
} else {
|
} else {
|
||||||
|
// FIXME: Use per-code-point fonts to measure text.
|
||||||
auto text_width = marker.first_available_font().width(marker_text);
|
auto text_width = marker.first_available_font().width(marker_text);
|
||||||
marker_state.set_content_width(image_width + CSSPixels::nearest_value_for(text_width));
|
marker_state.set_content_width(image_width + CSSPixels::nearest_value_for(text_width));
|
||||||
}
|
}
|
||||||
|
|
|
@ -307,6 +307,7 @@ void SVGFormattingContext::layout_nested_viewport(Box const& viewport)
|
||||||
Gfx::Path SVGFormattingContext::compute_path_for_text(SVGTextBox const& text_box)
|
Gfx::Path SVGFormattingContext::compute_path_for_text(SVGTextBox const& text_box)
|
||||||
{
|
{
|
||||||
auto& text_element = static_cast<SVG::SVGTextPositioningElement const&>(text_box.dom_node());
|
auto& text_element = static_cast<SVG::SVGTextPositioningElement const&>(text_box.dom_node());
|
||||||
|
// FIXME: Use per-code-point fonts.
|
||||||
auto& font = text_box.first_available_font();
|
auto& font = text_box.first_available_font();
|
||||||
auto text_contents = text_element.text_contents();
|
auto text_contents = text_element.text_contents();
|
||||||
Utf8View text_utf8 { text_contents };
|
Utf8View text_utf8 { text_contents };
|
||||||
|
@ -349,6 +350,7 @@ Gfx::Path SVGFormattingContext::compute_path_for_text_path(SVGTextPathBox const&
|
||||||
if (!path_or_shape)
|
if (!path_or_shape)
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
|
// FIXME: Use per-code-point fonts.
|
||||||
auto& font = text_path_box.first_available_font();
|
auto& font = text_path_box.first_available_font();
|
||||||
auto text_contents = text_path_element.text_contents();
|
auto text_contents = text_path_element.text_contents();
|
||||||
Utf8View text_utf8 { text_contents };
|
Utf8View text_utf8 { text_contents };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue