1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:57:44 +00:00

LibPDF: Remove minor duplication in Renderer::text_show_string_array()

This "regressed" in #10080 (back then, the branches were smaller).

No behavior change.
This commit is contained in:
Nico Weber 2024-03-01 10:57:38 -05:00 committed by Andreas Kling
parent 62596f3e43
commit 004e47df88

View file

@ -596,12 +596,8 @@ RENDERER_HANDLER(text_show_string_array)
auto elements = MUST(m_document->resolve_to<ArrayObject>(args[0]))->elements();
for (auto& element : elements) {
if (element.has<int>()) {
float shift = (float)element.get<int>() / 1000.0f;
m_text_matrix.translate(-shift * text_state().font_size * text_state().horizontal_scaling, 0.0f);
m_text_rendering_matrix_is_dirty = true;
} else if (element.has<float>()) {
float shift = element.get<float>() / 1000.0f;
if (element.has_number()) {
float shift = element.to_float() / 1000.0f;
m_text_matrix.translate(-shift * text_state().font_size * text_state().horizontal_scaling, 0.0f);
m_text_rendering_matrix_is_dirty = true;
} else {