Skip to content

Misc. bug: webui doesn't support RTL text #21362

@spaceexperiment

Description

@spaceexperiment

Name and Version

version: 8640 (7992aa7)
built with AppleClang 17.0.0.17000604 for Darwin arm64

Operating systems

No response

Which llama.cpp modules do you know to be affected?

No response

Command line

Problem description & steps to reproduce

when receiving rtl text like the Arabic, the text output is left aligned (and thus, messed up).
the fix is straight forward as the browsers handle this alread, we only need to add dir="auto" in the wrapped div.
I would create a PR, but i am not very fimiliar with the code structure nor am i familiar with svelte.

here is a screen with the default output, as you can see, the . in the first line is almost in the center of the text, and the text is left aligned. this happent when the text is rtl and contains a mix of ltr and rtl.
Image

here is a screen with the correct output after addeding dir="auto"

Image

here is the change i made in the html, simply added dir="auto"

Image

First Bad Commit

No response

Relevant log output

Logs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions